I am planning to build part of an internal dashboard around SSRS reports. I'm using ASP.net (framework 4), SQL Server 2008 R2, IIS6 and have built all my reports already in Report Builder 3.0.
Now it comes to pulling the reports through from the report server to the dashboard using the ReportViewer control. What I would like to do is to hide the SSRS report parameters and provide them myself from code behind, because the SSRS parameter selection controls are ugly (Windows 95 ugly) and don't fit with the look and feel of the site. Also, I have different end-user reports that are in fact the same report with different parameter selections (and I don't want to show these selection controls).
The issue is that all of my reports are VERY heavily parameterised - the business users want reports that are as flexible as pivots (you can imagine the fun I had building these reports). As a result I use a large number of shared datasets to provide the default and available values for each parameter. Since I intend to present these parameters myself in my web application, I need to know:
I am happy to store the names/types of each parameter in a database table, but there would be far too many values to store to do the same with parameters (plus the data is too dynamic). Can anyone think of a solution?
In fact, it is quite easy to retrieve the Default and Available parameter values used in the report:
Once you have set the report source, ServerReport.GetParameters() returns a collection of ReportParameterInfo which, for each parameter, provides the data type, default/available values ("Values"/"Valid Values" respectively, where "Valid Values" are value/label pairs) and other useful attributes like a list of other parameters that depend on it.
So, just save default/available parameters in the report (using Report Builder / Report Manager) and use this to retrieve them in your code behind.