Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.rdlc Report - Cannot create a data reader for dataset 'DataSet1'

I have created a .rdlc-Report under VS 2012 using the report wizard and added data source and dataset. When I try to render the report using the code below I get following error message:

Cannot create a data reader for dataset 'DataSet1'.

bytes = localReport.Render("PDF", sdeviceinfo, out smimetype, out sencoding, out sfilenameextension, out streamids, out myWarnings);
like image 470
Thomas Avatar asked Mar 12 '13 15:03

Thomas


3 Answers

I have same problem that "Cannot create a data reader for dataset 'zzz'"

The answer is ReportDataSource(string xxx, DataTable yyy)

You should use the right name. xxx should be zzz

like image 92
icqbox Avatar answered Oct 18 '22 21:10

icqbox


My 'gotcha' was the discovery that DataSet was not the same as Dataset.

like image 34
Greg Avatar answered Oct 18 '22 19:10

Greg


enter image description here

enter image description here

You have to give "DataSet1", otherwise it will not work.

like image 5
Md Shahriar Avatar answered Oct 18 '22 21:10

Md Shahriar