Press "Enter" to skip to content

How to download the SSRS report from a Smartform

0

When you need to download the report from the SQL Reporting Services upon a button click in a smartform, you can either use the SSRS ServiceBroker, which is available OOB (at least in K2 4.7) or simply use the following simple trick.

From your smartform you need to use the standard action Navigate to URL, specifying the following:

https://[SSRSUrl]/reportserver/?[UrlEncodedReportPath]&rs:Command=Render&rs:Format=Excel&rs:ClearSession=True

For example, when I click on the existing sample report, it will open with the following url:

This will mean, that if I want to download it in Excel, I have to navigate to the following URL inside the smartform: 

https://ssrs.denallix.com/reportserver/?%2fSamples%2fFreeFormReport&rs:Command=Render&rs:Format=Excel&rs:ClearSession=True

After you build your URL, you can paste it in the browser and you should be able to download SSRS Report.

  • rs:Format – unless you created your own formats in the SSRS, you can use the following values to download different types of files:
    • XML
    • PDF
    • MHTML
    • Excel
    • Image
    • Word
    • CSV
  • rs:ClearSession – I use this parameter to make sure the file always contains the latest data. But you can decide on your own, if you need this or not.

For more details on SSRS parameters, please, refer to URL Access Parameter Reference.

Leave a Reply

Your email address will not be published. Required fields are marked *

nineteen − 8 =