pckben
asked on
How to bind only 1 DataRow Object to the Report?
Hi there,
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 .DataSourc es.Add(new ReportDataSource("myDataSe tName", myDataRowObject));
... but it gave me an ArgumentException:
Value does not fall within the expected range.
Anyone could help me please?
Thanks in advance,
pckben.
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
... but it gave me an ArgumentException:
Value does not fall within the expected range.
Anyone could help me please?
Thanks in advance,
pckben.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
use a BindingSource object to bind to the specific DataRow, then
myReportViewer.LocalReport