Query Engine Error trouble

R

raf_z

Hi,

I think i'm doing something simple, although i may be wrong. I was able
to load a Crystal report file up until today, and even now, its only 1
report that's misbehaving. I'll confess that i didn't create the
report, it was done by our Crystal guy with Crystal 9 (or 8), all i do
is load it using .NET, which, like i said before, worked just fine.
Here's the code:

//i call this func from Page_Load passing in only the filename
//the rest is hardcoded.
public void LoadCrystalReport(string strServerName,
string strDB_Username, string strDB_Password, string
strReportFilename)
{
ReportDocument crReportDocument = new ReportDocument();

crReportDocument.Load(Server.MapPath(strReportFilename));

Database crDatabase;
Tables crTables;
TableLogOnInfo crTableLogOnInfo;
ConnectionInfo crConnectionInfo;

//Set the crConnectionInfo with values either stored in
//the report or hard coded below
crConnectionInfo =
crReportDocument.Database.Tables[0].LogOnInfo.ConnectionInfo;
crConnectionInfo.DatabaseName = "";
crConnectionInfo.ServerName = strServerName;
crConnectionInfo.UserID = strDB_Username;
crConnectionInfo.Password = strDB_Password;

//Set the CrTables object to the Tables collection of
//the Report's dDtabase
crDatabase = crReportDocument.Database;
crTables = crDatabase.Tables;

// LOOP THRU THE CRYSTAL REPORT 'TEMPLATE',
// TO GET THE LOGON INFO ETC.
for (int i = 0; i < crTables.Count; i++)
{
crTableLogOnInfo = crTables.LogOnInfo;
crTableLogOnInfo.ConnectionInfo = crConnectionInfo;
crTables.ApplyLogOnInfo(crTableLogOnInfo);
}

crReportDocument.SetParameterValue("startdate", "6/1/2005");
crReportDocument.SetParameterValue("enddate", "8/1/2005");

// this will retrieve it as a web page
this.CrystalReportViewer1.ReportSource = crReportDocument;
}


//At this point it crashes giving me

Query Engine Error:
'c:\inetpub\wwwroot\myutils\Abs_Tard_for_Certifier.rpt'
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details:
CrystalDecisions.CrystalReports.Engine.DataSourceException: Query
Engine Error: 'c:\inetpub\wwwroot\myutils\Abs_Tard_for_Certifier.rpt'

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace below.


Stack Trace:


[DataSourceException: Query Engine Error:
'c:\inetpub\wwwroot\myutils\Abs_Tard_for_Certifier.rpt']
.F(String  , EngineExceptionErrorID 
) +540
.A(Int16 , Int32 ) +537

CrystalDecisions.CrystalReports.Engine.FormatEngine.GetPage(PageRequestContext
reqContext) +539

CrystalDecisions.ReportSource.LocalReportSourceBase.GetPage(PageRequestContext
pageReqContext) +189
CrystalDecisions.Web.ReportAgent.u(Boolean N) +164
CrystalDecisions.Web.CrystalReportViewer.OnPreRender(EventArgs e)
+108
System.Web.UI.Control.PreRenderRecursiveInternal() +62
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Control.PreRenderRecursiveInternal() +125
System.Web.UI.Page.ProcessRequestMain() +1499


-------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.2032;
ASP.NET Version:1.1.4322.2032

I've tried opening the report file and re-saving it as a Crystal for
VS.NET file, no difference. I checked to make sure i have the correct
Merge Modules as well as the DLLs in System32. The weird thing about
this is, the Abs_Tard_for_Certifier.rpt file is the only one that
crashes, even some previous versions of it. Other rpt files display
just fine.

If anyone can help, I'd really appreciate it.

Thanks.


Regards,

Rafael Zavulunov
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top