We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

nullReferenceexption when loading SSRS report

Thread ID:





121664 Jan 14,2016 01:46 PM UTC Jan 19,2016 06:43 AM UTC ASP.NET MVC 3
Tags: ReportViewer
Agustin Silva
Asked On January 14, 2016 01:46 PM UTC

We haven't been able to open reports in SSRS using the control. I'm able to got directly to the reporting services web site and open the report and run it, but not from the control.

In order to verify if it was my code, I modified the sample code, just to point to our reporting server, no luck, same error.

Attached is the image.

Attachment: Capture_23803288.zip

Soundara Rajan S [Syncfusion]
Replied On January 15, 2016 08:30 AM UTC

Hi Agusti,

Thanks for contacting Syncfusion support.

We are unable to reproduce the mentioned issue at our end and it’s working fine. The mentioned issue might be occurred due to specify the invalid the report path to report in your application. So please ensure the provided reportPath in your sample. We have prepared standalone based on your requirement and it can be downloaded from below location,

Please refer the below UG Documentation more details on this,

If the issue still persists, then share the razor view page and implemented the IReportController(WebAPI service) file with us to validate this issue.

Soundara Rajan S.

Agustin Silva
Replied On January 15, 2016 12:30 PM UTC

I tried using a local rdl file, same error. 

If I use invalid credentials, I will get a 404 from the server. With the correct credentials I get the null exception.

Can it be the report server version? What about the parameters? The report have three parameters, do i need to include them in the definition? Does the datasource name in the code have to match the datasource name in the report?

Here is an extract from the rdl file:
          <QueryParameter Name="@EBTAcc">
          <QueryParameter Name="@segSoc">
          <QueryParameter Name="@caso">

This is the view code:

                .ToolbarSettings(tb => tb.Items(Syncfusion.JavaScript.ReportViewerEnums.ToolbarItems.All))

Here is part of the api

public void OnInitReportOptions(ReportViewerOptions reportOption)
            string reportserverUrl = WebConfigurationManager.AppSettings["ReportServerUrl"];
            reportOption.ReportModel.ReportServerCredential = new System.Net.NetworkCredential("theuser", "thepassword");
            //reportOptions.ReportModel.ProcessingMode = ProcessingMode.Remote;
            reportOptions.ReportModel.ReportServerUrl = reportserverUrl ;
            reportOption.ReportModel.DataSourceCredentials.Add(new DataSourceCredentials("DataSourceHistorial", "anotheruser","anotherpassword"));

Soundara Rajan S [Syncfusion]
Replied On January 19, 2016 06:43 AM UTC

Hi Agusti,

In the shared code example, you have specified the invalid report processing mode and report path. Due to this, you are facing the null exception while loading the report at your end. So, please specify the processing mode as Remote for SSRS report and modify the SSRS report path as shown in the below example,

Processing Mode
                .ReportPath(“/Report Project1/rptHistDetallePago")
                .ToolbarSettings(tb => tb.Items(Syncfusion.JavaScript.ReportViewerEnums.ToolbarItems.All))

Report Path(Specify the report name without rdl file extension along with Folder Directory)

Soundara Rajan S.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon