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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With