SSRS Configuration in ASP.NET Core ReportViewer

23 Feb 20231 minute to read

The ReportViewer has support to load RDL reports from SSRS server. You have to set your SSRS server URL to ReportViewer’s ReportServiceUrl property and set the relative path of RDL file in SSRS to ReportViewer’s ReportPath property.

  • JAVASCRIPT
  • <ej-report-viewer id="reportviewer1" report-service-url="../Home" processing-mode="Remote" ReportServerUrl="http://mvc.syncfusion.com/ReportServer"  ReportPath="/SSRSSamples2/Territory Sales New">    
        </ej-report-viewer>

    Network Credentials for SSRS

    The Network credentials can be given at WebAPI Controller to connect the SSRS server.

  • C#
  • /// <summary>
    /// Report Initialization method that is triggered when report begins to process.
    /// </summary>
    /// <param name="reportOptions">The ReportViewer options.</param>
    public void OnInitReportOptions(ReportViewerOptions reportOptions)
    {
        //Adds SSRS Server and Database Credentials here.
        reportOptions.ReportModel.ReportServerCredential = new System.Net.NetworkCredential("ssrs", "RDLReport1");
        reportOptions.ReportModel.DataSourceCredentials.Add(new DataSourceCredentials("AdventureWorks", "ssrs1", "RDLReport1"));
    }

    NOTE

    DataSource credentials must be added to the ReportViewer for Shared DataSources that do not have credentials in the connection string and used in the SSRS Reports.

    NOTE

    Pure ASP.Net Core project will support only SSRS 2017 server and ASP.NET Core project with the combination .NET framework will render report from all SSRS server version.