Available / default values ​​for custom SSRS report parameters in ASP.net web application

I am planning to create a part of an internal dashboard in SSRS reports. I am using ASP.net (framework 4), SQL Server 2008 R2, IIS6 and have already compiled all my reports in Report Builder 3.0.

Now it comes to displaying reports from the report server to the dashboard using the ReportViewer control. What I would like to do is hide the SSRS report options and expose them to myself behind the code, as the SSRS options selectors are ugly (Windows 95 ugly) and don't match the look and feel of the place. Also, I have different end-user reports which are actually the same report with different parameters (and I don't want to show these selection controls).

The problem is that all of my reports are very highly parameterized - business users want reports that are as flexible as turning points (you can imagine what a pleasure I've created for these reports). As a result, I use a large number of generic datasets to provide default and available values ​​for each parameter. Since I intend to expose these parameters myself in my web application, I need to know:

  • What are the parameters for each report (name and type)
  • What are the default values ​​for each parameter
  • What are the available parameters for each parameter

I'm happy to store the names / types of each parameter in the database table, but there would be too many values ​​to store to do the same with the parameters (plus the data is too dynamic). Can anyone think of a solution?

+3


source to share


2 answers


In fact, it's pretty easy to get the Default and Available values ​​used in the report:

Once you have set the report source, ServerReport.GetParameters () returns a ReportParameterInfo collection that for each parameter provides the data type, default / available values ​​("Values" / "Values" respectively, where "Valid values" are value / label pairs ) and other useful attributes such as a list of other parameters that depend on it.



So, just keep the default / available options in the report (using Report Builder / Report Manager) and use that to get them in your code.

+3


source


Is this what you are looking for: http://msdn.microsoft.com/en-us/library/ms155391.aspx ? I am not quite clear what your problem is from your post, what exactly do you need to do what you are trying to do?



0


source







All Articles