Showing posts with label rpt. Show all posts
Showing posts with label rpt. Show all posts

Tuesday, March 27, 2012

Failed to load database information

I have Crystal Report 9 installed. I created rpt in VS2003 and set database as a dataset. Also, I developed a VS2003 dll to print report.

When I called the dll in VS2005, always got the error as the title: Failed to load database information. Even I made up datasource in dll, no luck. So there must be something wrong while calling 2003 dll from vs2005.

Any idea?

If I add CrystalDecisions.CrystalReport.Engine and CrystalDecisions.Shared in vs2005 project as reference, but the version is 9.2.3300.0. I add some codes to print report:

ReportDocument rpt = new ReportDocument();
rpt.Load(@."D:\VS 2005 Projects\CallPrintCrystalReport\CallPrintCrystalReport\CrystalReport1.rpt");
rpt.SetDataSource(CreateDS());
rpt.PrintToPrinter(1, false, 0, 0);
rpt.Close();

Same error!!! Does this mean CrystalReport 9.2.3300 can not be called by VS2005?Probably not, since CR of VS2005 is based-on version XI.|||Thank you. I just wanna make sure about it.sql

Sunday, February 19, 2012

Extracting SQL Query from Report (.rpt) in CR for VS.NET

Hi all,
I am new to Crystal report. I have a scenario in which i need to obtain the sql query from a report (.rpt file).
I am using ReportDocument object but it does not contains the property or method that returns the query. It seems that Report Designer (or report itself may be) stores (constructs) the sql query that reflect the report data [e.g. right click on "Database Field" node in Report Designer and select "Show SQL Query", it displays the query for the report.]
Does any body know how to get that query programmatically?

I would appreciate any sort of help.

Thanks,
AsimHi,
For your information...
have a look at:

http://support.businessobjects.com/library/kbase/articles/c2013145.asp

Kind Regards,
Asim