Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

passing fields collection into assembly method

I have an SSRS 2008 R2 report with some custom code that operates on multiple fields from the dataset. To simplify calling it (two parameters instead of 8), I pass the Fields collection into the function like:

Public Function BPLatest(whichBP as String, Fields as Fields) as Integer

Since I just realized I need that code in another report, I thought I could create a custom assembly in C# 2010 Express, rather than cutting-and-pasting it. However, the searching I've done to this point leads me to believe that I can't use the Fields collection in an assembly, even passed in as above. Is this actually the case? If not, what's the proper syntax to use?

like image 781
SarekOfVulcan Avatar asked Jul 20 '12 17:07

SarekOfVulcan


1 Answers

Running the expression =GetType(Fields).FullName tells me that type is Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.Fields

It is defined in Microsoft.ReportingServices.ProcessingObjectModel.dll

As far as I know objects in Fields collection are very dynamic, they are meaningful only in the scope of invocation.

Overall passing whole Fields collection into the custom code is not recommended.

like image 124
user1578107 Avatar answered Oct 06 '22 18:10

user1578107