Click here to Skip to main content
15,886,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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 but 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.

Obviously I need to know how to get the detail in the report.
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();


Thanks
Posted
Updated 17-Jun-10 6:09am
v2

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