Home > Reporting Services > SSRS – Reporting Services and custom assemblies

SSRS – Reporting Services and custom assemblies

Just cost myself a few hours on this one.

I have recently installed the 2008 R2 Nov CTP, I also have RS reports that use a custom assembly.

(The custom assembly provides a Parameters class that returns a formatted string for the selected parameters on a page. We have staffID’s and client ID etc to identify people in our company, so you can type in a staff ID as a parameter to the report, or even a CSV list of staffID’s. The assembly will interogate the parameters, if it is a drop down it will interogate the webservices and find the display value for the selected value directly from the report definition, if it is a parameter of a given type – like staffID – it does a database lookup and returns a nicely formatted string that is rendered into a report. I am thinking of turning this into an assembly that anyone could purchase and making it configurable via xml… if there is interest?)

Anyway…

When it comes to writing and deploying custom assemblies you should read this;
http://bryantlikes.com/WritingCustomCodeInSQLServerReportingServices.aspx
Bryant is the man when it comes to this stuff

The thing was that my report was running successfully when I deployed it but not when running in BIDS – (Business Integration Development Studio).

I was getting this error

Failed to load expression host assembly. System.Security.Permissions.SecurityPermission

When you configure you assembly as per the instructions provided by bryant, you need to configure;

– rssrvpolicy.config, found generally in a location like D:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\ReportServer,
(this is the path for the NOV CTP on a x64 bit machine installed on D drive)

But there is also a corresponding policy file for BIDS to use and this also needs to be configured. It resides in the same folder as your IDE\PrivateAssemblies where you copied you assembly for BIDS to work;
RSPreviewPolicy.config – D:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies

Updating this policy file fixed my issues.

Cheers
John

Advertisements
Categories: Reporting Services
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: