How to bind only 1 DataRow Object to the Report?
Posted on 2006-06-25
I have a strongly typed dataset, now I want to display all the information of only 1 selected Row on the Crystal Report. Is there any way to 'bind' this object to the report? (not the passing parameters solution)
I've tried this ...
In VS2005, in the Report Designing page,
I added 1 Data Source of Type Object and chosed an DataRow object, then renamed it to "myDataSetName". Then I passed the Row need to be displayed using the following statement:
myReportViewer.LocalReport.DataSources.Add(new ReportDataSource("myDataSetName", myDataRowObject));
... but it gave me an ArgumentException:
Value does not fall within the expected range.
Anyone could help me please?
Thanks in advance,