Crystal report export - Crystal report 2008
I used to use CR for VS.net 2005 version to call database to get a dataset, then feed a rpt file, to generate different file format.
Here is the code I used to work with VS2005 version of CR runtime:
ReportDocument doc = new ReportDocument();
DataSet dsReport = ... // get from db
dsReport.Tables.TableName = doc.Database.Tables.Location;
// set export file option
rpt was designed through CR 10.
Now, I downloaded a trail version of CR2008, but everytime, when export method called, I got this execption:
Failed to load database information.
at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
Can someone tell me what should I do with CR2008 to fix this problem? If I switched back to CR for vs 2005, then it works.