Passing parameters to a report

Lately we’re getting more and more interest from multitenancy SaaS providers and OEM partners who want to integrate RSinteract into their web applications. A really useful feature of RSinteract is the ability to link to a report from a 3rd party application and pass filter values and UI parameters on the URL.

To do this with a report based on a SQL Server or Oracle data source:

For a report based on an Analysis Services OLAP data source:

  • Create a report with filters, or use this sample report which comes with RSinteract: http://localhost/RSinteract/?/RSinteract+Samples%2fSales+by+Country+(OLAP)
  • Open the report and hover over the parameter in the left hand sidebar
  • Note the RDL field: Date_Fiscal
  • Hold ctrl and double click on the empty bit of sidebar below the Filters panel, click OK to hide the popup message and you’ll see the Reporting Services toolbar at the top of your report
  • Note the parameter value {[Date].[Fiscal].[Fiscal Year].&[2004]}
    • Remove the braces { }
    • Change ampersands to %26
    • Change [ to %5b
    • Change ] to %5d
    • Separate the parameters with &
    • Replace any spaces with %20
    • Parameter names are case-sensitive
  • Put your new URL together by adding: &Date_Fiscal=%5bDate%5d.%5bFiscal%5d.%5bFiscal%20Year%5d.%26%5b2003%5d
  • Try your new URL …Sales+by+Country+(OLAP)&Date_Fiscal=%5bDate%5d.%5bFiscal%5d.%5bFiscal%20Year%5d.%26%5b2003%5d

Notes:

  • Any errors in the report frame are probably due to invalid parameters – if you’re not sure about your parameter values then paste them directly into the Reporting Services toolbar and hit the “View Report” button
  • You don’t need to pass all of a report’s filter parameters on the URL, those not passed will use the normal report defaults.
  • If your Filters tab has the ‘Always Ask’ option ticked you’ll need to add “&rsi:noq=1” to the URL to tell RSinteract not to show the question screen.
  • The rsi:noq=1 option only works if all parameters in the report have a default value or a value is passed on the URL.
  • Make sure you keep everything case sensitive.
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.