Load SSRS Report Server reports
The Bold Reports® UWP Report Viewer loads RDL reports from an SSRS Report Server. To render SSRS reports, set the ReportServerUrl and ReportServerCredential properties as in the following code snippet:
this.ReportViewer.ReportServiceURL = @"https://demos.boldreports.com/services/api/ReportViewer";
this.ReportViewer.ReportServerUrl = "http://<servername>/reportserver$instanceName";
this.ReportViewer.ReportServerCredential = new System.Net.NetworkCredential("ssrs", "RDLReport1");
this.ReportViewer.ReportPath = "/SSRSSamples/Territory Sales"; //The report path should be in the format of "/folder name/report name"
this.ReportViewer.RefreshReport();How do I set data source credentials for shared data sources?
To set data source credentials for shared data sources in the UWP Report Viewer, specify the DataSourceCredentials for each report data source.
-
The SSRS Report Server does not provide options to get credential information of the report data source deployed on the SSRS server. If the report has any data source that uses credentials to connect with the database, then you must specify the
DataSourceCredentialsfor each report data source to establish database connection.this.ReportViewer.ReportServiceURL = @"https://demos.boldreports.com/services/api/ReportViewer"; this.ReportViewer.ReportServerUrl = "http://<servername>/reportserver$instanceName"; this.ReportViewer.ReportPath = "/SSRSSamples/Territory Sales"; //The report path should be in the format of "/folder name/report name" this.ReportViewer.RefreshReport(); -
To set shared datasource credentials in Web API Controller, use the following code in the
OnReportLoadedmethod.[NonAction] public void OnReportLoaded(ReportViewerOptions reportOption) { //Add SSRS Report Server and data source credentials reportOption.ReportModel.ReportServerCredential = new System.Net.NetworkCredential("ssrs", "RDLReport1"); reportOption.ReportModel.DataSourceCredentials.Add(new BoldReports.Web.DataSourceCredentials("<database>", "ssrs1", "RDLReport1")); }
How do I render linked reports?
To render a linked report in the UWP Report Viewer, set the linked report path as the report path. A linked report points to an existing report that is published in the SSRS Report Server. You can also set the parameter, data source, credential, and other properties as for normal SSRS reports.
this.ReportViewer.ReportServiceURL = @"https://demos.boldreports.com/services/api/ReportViewer";
this.ReportViewer.ReportServerUrl = "http://<servername>/reportserver$instanceName";
this.ReportViewer.ReportServerCredential = new System.Net.NetworkCredential("ssrs", "RDLReport1");
this.ReportViewer.ReportPath = "/SSRSSamples/Territory Sales_Link"; //The report path should be in the format of "/folder name/report name"
this.ReportViewer.RefreshReport();The
Territory Sales_Linkis a linked report created forTerritory Salesreport that is already available on the SSRS Report Server.