0

I'm using visual studio c# express, I want to creat a simple report but the problem is that vs is missing all the features for creating report I found this link

http://social.msdn.microsoft.com/Forums/en-US/bbfdef7c-9dfe-479a-9806-c2c07b53879e/report-designer-in-visual-c-2010-express?forum=Vsexpressvcs

I've installed ReportViewer and I created my report using SQL Server Report Builder and changed .rdl to .rdlc and copied the report in to my win app but I don't know how to set the ReportDataSource

I've created a dataset in my win app and this is my code:

reportViewer1.Reset();
reportViewer1.LocalReport.DataSources.Clear(); 
reportViewer1.LocalReport.ReportPath = ("rptStockCount.rdlc"); 
reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("DataSet1")); 
reportViewer1.RefreshReport();

and this is the error: cannot create a data reader from data set 1

Any suggestion or help?

4

0 回答 0