Click here to Skip to main content
15,900,511 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have the following in a WPF window trying to open an RDLC report using a WindowsFormsHost. When the report opens there is a report header with no data. The query has no parameters and I have previewed the data in the data set many times.

I have seen many attempts to explain the meanings of ReportDataSource.Name and ReportDataSource.value but it is not yet clear to me what each is supposed to mean. I have not been able to implement anything but that which is listed below.

Thanks -

C#
string reportPath = "C:\\Dev\\2010\\2010_BoxingAdmin\\BoxingAdmin\\BoxingAdmin\\Report1.rdlc";
            string ds = "DEVELOPMENT;Initial Catalog=Boxing;Integrated Security=True";
            ReportDataSource rds = new ReportDataSource("DataSet1", ds);
            ReportViewer reportViewer = new ReportViewer();
            reportViewer.ProcessingMode = ProcessingMode.Local;
            reportViewer.LocalReport.ReportPath = reportPath;
            reportViewer.LocalReport.DataSources.Add(rds);   
            windowsFormsHost1.Child = reportViewer;
            reportViewer.RefreshReport();


Reply
Posted
Updated 16-Jun-10 12:54pm
v2
Comments
bond_cse05 15-Sep-10 6:11am    
I am facing the same problem. If you have overcome this problem please post it.

1 solution

I also do the same mistake, what you made here.

The second parameter here is just your connection string. It's not actually a data source. But I don't know about first parameter. Now i am still finding that.

http://www.codeproject.com/Questions/178783/Error-On-Microsoft-Report-in-wpf.aspx[^]
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900