Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

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();

doc.Load("path.rpt");

DataSet dsReport = ... // get from db

dsReport.Tables[0].TableName = doc.Database.Tables[0].Location;

doc.SetDataSource(dsReport.Tables[0]);

// set export file option

doc..Export();

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.

Thanks,

Jacky

Not what you were looking for? View more on this topic or Ask a question