Sunday, February 19, 2012

Custom Assembly not invoked in Report Manager

Hi,

I developed a custom assembly( in C# ) which references satellite assemblies. In order to refer this assembly in one of my reports, I copied the assembly and its dependencies in the Report Server bin folder and Report Designer folder. Also I inserted CodeGroup tag for the custom asembly in both rssrvpolicy.config and rspreviewpolicy.config with Full Trust.

Now, the report works perfectly when I preview it through Visual Studio.NET IDE. But when I deploy the same report to the report manager, it is not working. It does not give any error, but the textboxes whose expression invoke the method in the custom assembly, have empty values. So, the text boxes show up empty.

Any idea where am going wrong?

Thanks,

Rama

You also need to add code groups for all non-MS assemblies referenced by your custom assembly.
Do not forget to assert permissions (or fulltrust) in your custom assembly

|||

Hi,

As I mentioned in my post, I have added the code group for the custom assembly and given full trust permission for it. I will explain more about the custom assembly.

The custom assembly just reads strings from satellite assemblies( based on the current culture ) and assigns it as value to a textbox in the report. When I preview the report from the Visual Studio.NET IDE , it works perfectly fine i.e. it reads the strings from the satellite assembly linked with the user's culture.

When I deploy the report to the report manager, the custom assembly returns the following exception:

System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture (or the neutral culture) in the given assembly. Make sure "ReportStrings.resources" was correctly embedded or linked into assembly "ReportLocalization".
baseName: ReportStrings locationInfo: <null> resource file name: ReportStrings.resources assembly: ReportLocalization, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
at Microsoft.DCMReports.ReportLocalization.ResourceHelper.GetResourceValue(String resourceKey)
at Microsoft.DCMReports.ReportLocalization.Reports.GetValue(String culture, String key)

I have copied the custom assembly to the Report Server bin folder and copied the satellite assemblies onto their specific culture folders i.e. satellite assemblies linked to the custom assembly with culture "de", will be copied to the "de" folder and so on.

Should I do something for this satellite assembly too? Please give your suggestions.

Thanks,

Rama

No comments:

Post a Comment