Can you use Azure SSRS reports in ReportViewer?
2 Jun 20211 minute to read
Yes, Syncfusion Report Viewer supports viewing and exporting Azure hosted reports. By default, Azure Reporting Service works with a Forms credential. So, provide your Forms credential in the ReportServerFormsCredential to view the report.
this.reportViewer1.ReportLoaded += (sen, arg) =>
{
IList < DataSourceCredentials > credentials = new List < DataSourceCredentials > ();
foreach(var datasource in this.reportViewer1.GetDataSources())
{
DataSourceCredentials creden = new DataSourceCredentials();
creden.Name = datasource.Name;
creden.UserId = "username";
creden.Password = "password";
credentials.Add(creden);
}
this.reportViewer1.SetDataSourceCredentials(credentials);
};
this.reportViewer1.ReportPath = " / AzureReportProject / Reports";
this.reportViewer1.ReportServerUrl = @"http://ServerName/ReportServer";
this.reportViewer1.ReportServerFormsCredential = new System.Net.NetworkCredential("userID", "Password");
this.reportViewer1.RefreshReport();