Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Adding Custom Code To Reporting Services


Adding Custom Code To Reporting Services

Author
Message
Vasant Raj
Vasant Raj
SSC Veteran
SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)

Group: General Forum Members
Points: 201 Visits: 137
Comments posted here are about the content posted at http://www.sqlservercentral.com/columnists/rVasant/2803.asp
Paul McKay
Paul McKay
SSC Journeyman
SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)

Group: General Forum Members
Points: 77 Visits: 64

Hi there,

Nice article - I wasn't aware of the need to create objects to represent your classes - I had previously just went for the myClass.myFunction method and this seemed to find the classes successfully.

I have previously managed to get a custom code DLL registered and working with a report designed in Report Designer.

However, this was using single variables (mainly ints). What I am now attempting to do is pass in a comma delimited string of int values ("1,2,3") etc and I am encountering difficulties. I am using the same assembly as is already working and the code compiles in Report Designer, indicating that the report can find the method specified so I don't think it's a problem there.

Is there a problem with the way I am supplying the data? I have set the comma delimited string as the source of a multi-value string parameter for use in a query.

I only get "An error coccurred during local report processing. Error during processing of "myParameter" report Parameter".

Any ideas would be most welcome.

Thanks,

Paul.


Vasant Raj
Vasant Raj
SSC Veteran
SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)SSC Veteran (201 reputation)

Group: General Forum Members
Points: 201 Visits: 137

In Reporting services, the type-validation is not done. The values are converted implicitly.

If you pass ("1,2,3") to an int parameter in the function, then it is considered as 123.

If ("1,2,3") is passed as string, then it is considered as "1,2,3".


Michael DePouw
Michael DePouw
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 15

Why does the dll have to go in the PrivateAssemblies directory?

And more importantly would that directory exist on a server with Reportin Services installed and not VS 2005?  I.E. how do I deploy the DLL?

Thanks for the article,

Mike


Paul McKay
Paul McKay
SSC Journeyman
SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)SSC Journeyman (77 reputation)

Group: General Forum Members
Points: 77 Visits: 64

You can copy the DLL to the ReportServer bin directory, usually found here:

C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\ReportServer\bin

I've a feeling that the DLL may deploy itself to the ReportServer bin if your project is configured to deploy to the report server (at least my project took an awfully long time to build after adding the DLL as a reference) but I haven't tested this out.

 


Michael DePouw
Michael DePouw
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 15

When I initially tried to deploy the report it failed saying unable to locate the dll.  So I copied the dll to the location you specified and the deployment worked.  It did take longer to deploy this time like you said.

Thanks for the post,

Mike


Tanmaya K
Tanmaya K
SSC-Enthusiastic
SSC-Enthusiastic (158 reputation)SSC-Enthusiastic (158 reputation)SSC-Enthusiastic (158 reputation)SSC-Enthusiastic (158 reputation)SSC-Enthusiastic (158 reputation)SSC-Enthusiastic (158 reputation)SSC-Enthusiastic (158 reputation)SSC-Enthusiastic (158 reputation)

Group: General Forum Members
Points: 158 Visits: 25
Is it necessary that the dll has to be in the folder you specified onyl? What if the dll is given a strong name & placed in GAC?

Will it work? I think copying in GAC is more efficient than copying at two different locations.

Thanks,
Tanmaya
Arul Paulus-Rosenow
Arul Paulus-Rosenow
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 120
I am not familiar with adding custom code or assemblies. Is it possible to modify the XML code at runtime? I want to control the report parameter properties multi-value setting of True/False during runtime. Set it to True if I want the parameters to be multi-value or single-value. This is determined based on the value selected in parameter one.
nahajaj
nahajaj
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 5
Thank you! Very helpful article and works perfect with .RDL. But how to make .RDLC work?
I have installed VS 2008, reporting services 2005. Tried to copy my dll into C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer\bin and
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies

(for some reason I do not have RSPreviewPolicy.config in C:\Program Files\Microsoft Visual Studio 9\Common7\IDE....
then in my RSPreviewPolicy.config changed
<PermissionSet
class="NamedPermissionSet"
version="1"
Unrestricted="true"
Name="SSRSAssemblyLibraryPermissionSet"
Description="Allows access to SSRSAssembly Reporting resources">
<IPermission class="SecurityPermission"
version="1" Flags="Execution, Assertion" />

and

<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="SSRSAssemblyLibraryPermissionSet"
Name="SSRSAssembly"
Description="SSRSAssembly">
<IMembershipCondition
class="UrlMembershipCondition"
version="1.0.0.0"
url="C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\SSRSAssembly.dll"/>


and it still does not work. What I made wrong?
I really appreciated if anybody can help me. thanks




An error occurred during local report processing.
The definition of the report 'Main Report' is invalid.
Error while loading code module: ‘SSRSAssembly, Version=3.0.0.1, Culture=neutral, PublicKeyToken=null’. Details: Could not load file or assembly 'SSRSAssembly, Version=3.0.0.1, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
jeremyw-923963
jeremyw-923963
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 8
Does anyone know if there is a limitaion to the amount of arguments that can be passed to a method in a custom assembly? I have quite a few (in order to do some calculations) fields that I have to pass in. When I try to preview the report, it says that there are too many arguments. I have verified that I am passing all the required fields to supply the method. It seems that there isn't any (that I have been able to find) documentation on the limitations of SSRS. I appreciate everyone's ideas!
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search