
Problem using crystal report viewer
Roy, the SetDataSource method is used to pass a DataSet object to the
report engine. To assign a report to a CrystalReportViewer, you want
to use the ReportSource property. For example
daDataAdapter.Fill(dsDataSet)
rptMyReport.Load("c:\myreport.rpt")
rptMyReport.SetDataSource(dsDataSet)
crvCrystalReportViewer.ReportSource = rptMyReport
Hope this helps.
Andy
Quote:
> Hello
> ?m generating reports in crystal reports 9, and I load
> the reports dinamically and show its with a object
> CrystalReportViewer. Then I instance the object
> reportdocument and set the report; THE PROBLEM COMES when
> I set the object reportDocument to CrystalReportViewer
> using the metod called "setDataSource(reportdocument)". It
> send to me an error that say "Invalid Report Data Source"
> and I don t know why!!!.
> Thanks a lot!!!