Hi John,
Thank you for posting.
In VS2005, the SetDataSource() method of a CrystalReport has has four
override functions. They are SetDataSource(DataSet),
SetDataSource(DataTable), SetDataSource(IDataReader) and
SetDataSource(IEnumerable). If you pass a strong-typed DataTable to the
SetDataSource() method like the following:
oRpt.SetDataSource(Me.myDataSet.myDataTable), the VS2005 compiler consider
this call ambiguous between the SetDataSource(DataTable) method and the
SetDataSource(IEnumerable) method.
To fix the problem, you should cast the datatable instance to DataTable
type. The following is a sample.
oRpt.SetDataSource((DataTable)Me.myDataSet.myDataTable);
Hope this is helpful to you.
If you have any other concerns or need anything else, please don't hesitate
to let me know.
Sincerely,
Linda Liu
Microsoft Online Community Support
====================================================
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
====================================================