Reputation: 2767
I am trying to populate variables in the Report Custom Code area (or even better a DLL in C#) from a DataSet so I can say "Code.SomeSetting". What is the best way to do this? If you pass a SSRS DataSet as a parameter to a method only the CommandText is available.
Is this even possible?
My other alternative would be to pass in the connection string and use C# to query the database and populate these variables as soon as possible.
Also Where can I read about the exact rendering order of an SSRS report?
Thanks
Upvotes: 0
Views: 3953
Reputation: 1
The only way I found to pass a datasets information into either a variable, parameter or custom code is through sub reports. Basically you are running the report first, not displaying any data (preprocessing) and sending preprocessed information into your sub–report only through the sub-report’s parameters.
Here's how:
Enjoy
Upvotes: 0
Reputation: 3054
Here are 2 links I have favorited to use as reference for the custom code.
MSDN. Alot of data here, but an excellent resource. BlogPost Robert Bruckner is the lead developer on SQL Reporting Services. Another excellent resource. This post is more about aggregating aggregates in the Custom Code, but it gives you a good example to look at.
Upvotes: 2