Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Adding Custom Code To Reporting Services Expand / Collapse
Author
Message
Posted Wednesday, January 10, 2007 11:27 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, May 08, 2013 7:23 AM
Points: 199, Visits: 136
Comments posted here are about the content posted at http://www.sqlservercentral.com/columnists/rVasant/2803.asp
Post #335925
Posted Thursday, March 15, 2007 6:07 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, March 26, 2014 4:29 AM
Points: 75, Visits: 60

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.

Post #351754
Posted Thursday, March 15, 2007 6:53 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, May 08, 2013 7:23 AM
Points: 199, Visits: 136

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".

Post #351767
Posted Thursday, March 15, 2007 9:31 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, May 12, 2010 6:21 PM
Points: 3, Visits: 9

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

Post #351834
Posted Thursday, March 15, 2007 11:24 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, March 26, 2014 4:29 AM
Points: 75, Visits: 60

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.

 

Post #351885
Posted Thursday, March 15, 2007 11:38 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, May 12, 2010 6:21 PM
Points: 3, Visits: 9

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

Post #351896
Posted Monday, March 19, 2007 10:36 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, June 16, 2011 7:37 AM
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
Post #352552
Posted Monday, March 17, 2008 2:53 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, May 28, 2013 12:46 PM
Points: 9, Visits: 77
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.
Post #470520
Posted Tuesday, October 14, 2008 12:57 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, November 04, 2008 7:10 AM
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.
Post #585729
Posted Tuesday, October 28, 2008 1:04 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, June 25, 2009 10:08 AM
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!
Post #593187
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse