Richard Dudley

Pencil Bros. Geology, Inc. "We Deliver" Quality Assured * Satisfaction Guaranteed

<November 2008>
SuMoTuWeThFrSa
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456


Navigation

Pittsburgh Dot Net

Crystal Reports .NET

Subscriptions

Post Categories

Article Categories



"Query Engine Error" In Crystal Reports .NET 2003

If you receive a “Query Engine Error“ when working with ADO.NET datasets, there is a difference between the XSD you used to design your report from, and the structure of your dataset.  To verify this, add a datagrid to your form, and comment out the code that creates your crystal report.  Instead, bind the dataset to the datagrid, and view your form.  Verify that all the columns have the exactl same names, and they are in the same order.

If you need to update your XSD, you can make small changes manually.  To completely recreate your XSD, you can follow the easy steps in this post: Quick & Easy XSDs for Crystal Reports.

Once you have your updated XSD, you need to update your report.  You can do that easily by following the steps in this post: Updating Crystal Reports .NET if You Change the XSD.

[edit: 3/14/2005]

I received the following comment via e-mail:

You should take note that the XSD doesn't have to have an element for every field that's in the dataset. I found that the error is actually caused by having a element in the XSD that is NOT in the dataset. You can use a subset of the dataset in the XSD and it will still work.

For Crystal Reports, your XSD only needs to contain the dataset fields you want.  The rest will be ignored.  It doesn't hurt anything to have every field listed in your XSD, and only map the ones you need to the report.  But if you have a field in your XSD, that field MUST be in your dataset.

[/edit]

If you need additional help, post your question in the Crystal Reports forum over on http://asp.net.  Business Objects also has a useful guide here: Reporting off ADO.NET Datasets.

Crystal Reports .NET Programming
If you're new to Crystal Reports, or just to CR .NET, this is the book you need. Part how-to, part programming reference, lots of simple examples in both C# and VB.NET.

 

 

 

 

posted on Sunday, February 06, 2005 8:11 AM by richard.dudley





Powered by Dot Net Junkies, by Telligent Systems