Troubleshooting Issues with VS .NET Datasets and Crystal Reports
This Jive Document aims to help Visual Studio developer troubleshoot issues with Crystal Reports when connecting to ADO .NET Datasets.
Searching the SCN and using the techniques described in this document will resolve most issues when passing ADO .NET Datasets to SAP Crystal Reports.
For the most part, the issues are; slow performance, incorrect data, no data, prompt for login credentials to a database and more. The following errors are common:
"Unknown Database Connector Error"
"Failed to retrieve data from the database"
“Query Engine Error 'C:\WINDOWS\TEMP\temp.....rpt”
“Log on failed...”
- It is assumed that the developer is familiar with creation of datasets and the basic limits when using datasets with Crystal Reports. For more details see the following resources:
- Ensure that you are working with the latest Service Pack for your version of Crystal Reports. The following Jive Dcuments list the latest updates and links to the updates:
If the issue exists on a deployed system, but the application works on the development system, ensure that the Crystal Reports runtime matches the two systems. Use the Modules utility to check what DLLs and veriso of theDLLs used by an application.
Search the SCN community for solutions. You can use the SCN search page, or use the text search box located in the top right corner of each SCN space:
The following steps may apply on development as well deployed systems.
Create an XML file off of your dataset. Make sure this is done just before you set the dataset to the report:
- Copy the above created XML to your development system
- Open the problem report in the Crystal Reports designer
- In the Desigger, go to the Database menu and select “Set Datasource Location”
- In the “Replace with:” pane, expand the “Create New Connection” folder
- Double click the “ADO .NET (XML)” icon
- Browse to the location of the XML file you created in step (1)
- Click on the path to the XML. The <Update> button should enable
- Click on the <Update> button
One of a two possibilities should happen now:
- You will get a “Map Fields” dialog. This indicates that the XML written off of the dataset does not match what the report is expecting. This may be due to incorrect field names, incorrect field types, etc. It is up to the developer to eliminate the differences.
- Incorrect data or no data. There is an issue with the dataset and the developer will need to determine why the data is not present in the dataset. Looking at the XML may be a good place to start.