RDLC Error The report definition for report 'xxxxxx' has not been specified

Hi,


I was wondering around Google to find the exact solution for "The report definition for report 'path of rdlc file' has not been specified.
Got several things but no luck.....then I just went through all the properties of ReportViewer and then the ReportViewer1.LocalReport, there I found the RaportPath property which was not set while doing the Dynamic Report Binding.


I was using the below Code:



rvAll.ProcessingMode = ProcessingMode.Local;
rvAll.LocalReport.ReportEmbeddedResource = Server.MapPath("rprtsalesBill.rdlc");
ReportDataSource rds = new ReportDataSource("inventorycontrolDataSet_tblSales",  objSalesBillList); 
rvAll.LocalReport.DataSources.Clear();
rvAll.LocalReport.DataSources.Add(rds);
rvAll.LocalReport.Refresh();


And after analyzing the properties of LocalReport I added the below line of code
rvAll.LocalReport.ReportPath = Server.MapPath("rprtsalesBill.rdlc");
just before the ReportEmbeddedResource line.


And it worked.... 


Hope it will save some time of many...


Enjoy Coding!!!

Comments

Popular posts from this blog

CodeSmith Customization - Dynamic ConnectionString Login user based

cshtml binding js function with boolean parameter using model