Load SSRS rdl reports

The Bold Reports® WPF 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.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 WPF Report Viewer, specify the DataSourceCredentials for each report data source that uses credentials to connect with the database. The SSRS Report Server does not provide options to get the credential information of the report data source deployed on the SSRS server.

this.reportViewer.ReportLoaded += (sen, arg) =>
{
    List<BoldReports.Windows.DataSourceCredentials> dataSourceCrdentials = new List<BoldReports.Windows.DataSourceCredentials>();

    foreach (var dataSource in this.reportViewer.GetDataSources())
    {
        BoldReports.Windows.DataSourceCredentials crdentials = new BoldReports.Windows.DataSourceCredentials();
        crdentials.Name = dataSource.Name;
        crdentials.UserId = "ssrs1";
        crdentials.Password = "RDLReport1";
        dataSourceCrdentials.Add(crdentials);
    }

    this.reportViewer.SetDataSourceCredentials(dataSourceCrdentials);
};
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();

Data source credentials must be added for shared data sources that do not have credentials in the connection strings.

How do I render a linked report?

To render a linked report in the Bold Reports® WPF Report Viewer, set the report path to the linked report that is published in the SSRS Report Server. A linked report points to an existing report, and you can set the parameter, data source, credential, and other properties as for normal SSRS reports.

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_Link is a linked report created for Territory Sales report that is already available on the SSRS Report Server.

See also