MVC Report Viewer Error

Hi all.

I have created a project using MVC 4 application.

i have created a dataset model and .rdlc file using report viewer but i'm getting the following error when i run it

Error:



Can some one tell me what the error exact is and how to fix this



September 1st, 2015 11:44pm

Hi Raj,

Is your datasource mapped properly like this

 ReportDataSource datasource = new ReportDataSource("vBase_Population", ds.Tables[0]);
            ReportViewer1.LocalReport.DataSources.Clear();
            ReportViewer1.LocalReport.DataSources.Add(datasource);        
            ReportViewer1.LocalReport.Refresh();

Please do ensure that dataset names are same.  In the code you provided the dataset name which you have assigned to report viewer and the dataset name which you use in code behind is different.

Also make sure that the dataset is mapped properly with the tablix.

Free Windows Admin Tool Kit Click here and download it now
September 2nd, 2015 12:27am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics