Hi Korazy,
What you can do is add a DataSet to your project (Add New Item > DataSet). An xsd file will be added to your project and opened in the DataSet designer. In this designer, design what your data looks like, each field, name, datatype, etc.
In the report RDLC file, add this DataSet as a data source. Then you can drag fields from it into the report and design your report with it.
At runtime you need to provide your report with a ReportDataSource that has its name set to the same name as this DataSet in the RDLC file. Something like
this.reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("MyDataSetName", myObjectContainingTheData)); |
Be careful using the smart tags that are part of the ReportViewer control, they will add plumbing code to try and do this for you, and conflict with what you are trying to do. Set the report for the ReportVIewer to use with the property grid instead, or programmatically.
This is a common question, we are in the works of creating a blog entry and/or sample explaining it in nice detail. Stay tuned.
This posting is provided "AS IS" with no warranties, and confers no rights.