SSRS local report error - "An error occurred while processing the report"

I am running ReportViewer 10 using the local report (rdl) file on the MVC website. I am passing a DataSet that has the correct data with column names that match the report definition.

        var reportDataSource = new ReportDataSource("dataset1", resultSet);

        ReportViewer1.LocalReport.ReportPath = Server.MapPath("/Reports/Report2.rdl");
        ReportViewer1.LocalReport.DataSources.Clear();
        ReportViewer1.LocalReport.DataSources.Add(reportDataSource);

        List<ReportParameter> lst = new List<ReportParameter>();
        ReportParameter rptParam1 = new ReportParameter("Id", "54");
        lst.Add(rptParam1);
        ReportViewer1.LocalReport.SetParameters(lst);

        ReportViewer1.LocalReport.Refresh();

The error I get is:

enter image description here

I can not find more specific information about the exact error. Is there a log file somewhere that I can look at?

Thank.

+3
source share
1 answer

it turns out that the name of the data set must match the name specified in the report file, including exactly.

var reportDataSource = new ReportDataSource("dataset1", resultSet);

becomes:

var reportDataSource = new ReportDataSource("dataset1", resultSet);
+4
source

Source: https://habr.com/ru/post/1791614/


All Articles