Entries tagged with “ssrs”.


How to add a Excel Export Link to a Report
Add an item (e.g. TextBox, Image, etc.) and open the properties dialog. Under the navigation tab use the setting Go to URL and add following comand.


=Globals!ReportServerUrl.ToString() + "/Pages/ReportViewer.aspx?"
+ System.Web.HttpUtility.UrlEncode("https://ReportServer/ReportFolder/Report.rdl")
+ "&rs:Command=Render&rs:Format=EXCEL&rc:OmitFormulas=true"
+ "&[Parameter_Name1]=" + Join(Parameters![Parameter_Name1].Value, "&[Parameter_Name1]=") --> Multivalue Parameter
+ "&[Parameter_Name2]=" + System.Web.HttpUtility.UrlEncode(Parameters![Parameter_Name2].Value) --> Normaler Paraemter

It is important to use the HttpUtility.UrlEncode() function in order to pass the correct values.
In the properties dialog of the report add a reference to the System.Web assembly.

How to disable caching in SQL Server Reporting Services for Visual Studio in Preview Mode?

SQL Server 2005 Service Pack 1 brings a new feature: caching data in BIDS (Business Intelligence Development Studio) Report Designer. Following objects are cached: all the data query, parameter value and credentials for previewing a report. Sometimes this feature can be annoying, if changes in preview mode should be visible immediately.

In order to disable the caching feature, following key has to be added to the config file ‘RSReportDesigner.config‘.

Key:
<Add Key="CacheDataForPreview" value="False" />

Location:
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\RSReportDesigner.config
To clear the cache you can also delete the *.data cache file which is located in the report RDL directory.

SSRS: Caching Files (Preview Mode)

SSRS: Caching Files (Preview Mode)

How to pass parameters to ReportViewer Control displaying a remote report (SSRS):

ReportParameter[] parameters = new ReportParameter[2];

protected void Page_Load(object sender, EventArgs e) {
parameters[0] = new ReportParameter("wave_id", "28");
parameters[1] = new ReportParameter("mpc_id", "1530");
ReportViewer1.ServerReport.SetParameters(parameters);
}