We help IT Professionals succeed at work.

CRYSTAL REPORTS-Query engine error

Hello--I am encountering a Query Engine Error with Crystal Reports and would like to find an answer.  Here are the details:
Using Crystal Reports 10 (developer), I have developed a report which DOES use a subreport and shared variable.
In Developer, on my PC (Windows XP Professional, version 2002, Service Pack 3) I am able to run this report without problem.
When I load to Crystal Enterprise (version is listed as "Build Number: 390 , Product Version: 10.0.0.390"--our test environment), I get the query engine error.
When I load to Crystal Enterprise (version is listed as "Build Number: 1498, Product Version: 10.0.5.1498"-our production environment, I get the query engine error.

I have heard that this can be related to the .NET version loaded.  HOW do you tell what .NET version is loaded?

Any other help you could offer would be greatly appreciated.
Thanks
Comment
Watch Question

Commented:
add/remove programs will list your installed .net runtimes.

Author

Commented:
ok--I found that information for my PC:
Microsoft .NET Framework 1.1
Microsoft .NET Framework 2.0 Service Pack 2
Microsoft .NET Framework 3.0 Service Pack 2
Microsoft .NET Framework 3.5 SP1
While I try to determine what .NET installs exist on the Crystal Enterprise servers, is there a particular .NET install that could be suspect or a problem if missing?

Author

Commented:
Is there anything else you can offer to try or check in the meantime?

Author

Commented:
I found out that both of our Crystal Enterprise servers have .net framework 3.5 sp1 installed.  Therefore, the .NET framework is the same between my PC and these servers.

It is extremely likely that the .NET framework is NOT the problem.  Therefore I need to find out potential other causes for the query engine error, etc.

Help!!  Thanks

Commented:
I would make another question asking that exact question.
Commented:
There are two main reasons this error is thrown when using the PUSH (dataset) method of getting data to a Crystal Report.

1) The schema of the datatable differs from what the report was designed from.  This can be either a different field name, or a missing field, or in a different order.  The easiest way to debug this is to bind the dataset to a datagrid, and compare the resulting schema to the XSD you used to design the report.  Compare data types, column names, etc.  

2) The name of the data table is incorrect.  When you designed your report from an XSD, the report saved the name of the data table(s) that were in your dataset.  When you filled your dataset, you probably forgot to specify the name of the data table.  If you're using a DataAdapter, your command should be:

MyAdapter.Fill(MyDataSet, "MyTableName")

Check your XSD and compare the table name in the XSD with what you are setting in your Fill command.  To check the table name, open your XSD and look at the column headers for your data table.  That's the table name (unless you've manually been tinkering with the XSD, and then you're on your own).

Commented:
There are many reasons why you could get this error.  I had found out the reason for the error was because my dataset and the report fields did not match up.  To see if this is our problem you might want to create a simple report and see if you get the error.

Author

Commented:
While I appreciate your answers, I am confused.  I am using a SQL-SERVER ODBC for the dataset.  I am not sure what you mean that the dataset and report fields do not match up.  In Developer, if there are fields on the report without matching fields in the dataset, you get an error and the report will not run.  THis (ODBC) dataset is being used by dozens of other reports which get NO query error.  
Since this seems to be a fiarly common error (according to a Google search), I would guess that there are specific things I can check for in my report.

This report was originally designed for (and sucessfully used) an Oracel database.  We converted the report to use SQL ODBC using same steps used for all other Oracle reports converted to SQL.  All other reports work just fine using same data.
Thanks
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
Are you using the same tables or database?

Is this report using a stored procedure?

mlmcc

Author

Commented:
We are using the same database and tables that were in the Oracle version, only now in SQL.   No stored procedures.

Author

Commented:
No reponse--can ANYONE help me with this or am I on my own?
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013
Commented:
Did you change the database in the reports?

Have you tried the VERIFY DATABASE?

mlmcc

Author

Commented:
i will thanks

Author

Commented:
i solved this one on my own---I will still award points--thanks

Author

Commented:
While the input was appreciated, it really did not point me to the query engine error problem.  Thanks anyway.