Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If your reports typically use simple parameter sets, the default interface can work well (especially if your users are more savvy). But larger and more complicated parameter sets can quickly become overwhelming in the default interface (which can be an even bigger problem if you don't expect your users to be so savvy).</p> <p>I faced a similar problem with a large set of reports. Some can be very simple (I.E., no parameters or a simple date range) and some can be hideously overcomplicated (25+ parameters). </p> <p>The solution that we reached was to write an ASP.NET report menu application which retrieved the Parameters from SSRS for most reports and dynamically presented them to the users. Some reports were too complicated for this, so we went further and wrote WebUserControls for them which went further in simplifying the parameters for the users. This way, most Reports didn't require extra intervention, and for those that did, we had the framework for easily creating a wrapper.</p> <p>Here's an example of how to get the parameters for a given report through the SSRS Web Service:</p> <pre><code>'ReportingService is a reference to the WebService Dim rs As New ReportingService rs.Credentials = System.Net.CredentialCache.DefaultCredentials Dim Reports() As ReportingService.CatalogItem Reports = rs.ListChildren(ConfigurationManager.AppSettings("ReportPath"), True) For Each item As ReportingService.CatalogItem In Reports Dim historyID As String = Nothing Dim forRendering As Boolean = True Dim values As ReportingService.ParameterValue() = Nothing Dim credentials As ReportingService.DataSourceCredentials() = Nothing Dim params As ReportingService.ReportParameter() = Nothing If item.Type = ReportingService.ItemTypeEnum.Report And item.ID = ReportID Then params = rs.GetReportParameters(item.Path, historyID, forRendering, values, credentials) Dim i As Integer = 0 For Each param As ReportingService.ReportParameter In params 'Display the parameter or add to a collection or whatever Next End If Next </code></pre> <p>You can use the above method to get all of the parameters and then display them as you see fit. Then all you have to do is collect the results, validate them, and pass them to a ReportViewer.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload