Load SharePoint integrated reports
To render SharePoint integrated SSRS reports set the ReportPath, ReportServerUrl and ReportServerFormsCredential properties as in the following code snippet.
this.reportViewer.ReportPath = "http://<servername>/reportserver$instanceName/SSRSSamples/Territory Sales.rdl";
this.reportViewer.ReportServerUrl = "http://<servername>/reportserver$instanceName";
this.reportViewer.ReportServerFormsCredential = new BoldReports.Windows.ReportServerFormsCredential("ssrs", "RDLReport1");
this.reportViewer.RefreshReport();Set data source credential for shared data sources
The shared data source credentials can be added to the DataSourceCredentials property to connect with the database.
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.ReportPath = "http://<servername>/reportserver$instanceName/SSRSSamples/Territory Sales.rdl";
this.reportViewer.ReportServerUrl = "http://<servername>/reportserver$instanceName";
this.reportViewer.ReportServerFormsCredential = new BoldReports.Windows.ReportServerFormsCredential("ssrs", "RDLReport1");
this.reportViewer.RefreshReport();Data source credentials must be added for shared data sources that do not have credentials in the connection strings.