In this tutorial, we will advise the error that you might see when changing datasource in Crystal Report. The following is prompt error that you can see:
Cause
Often during the course of a report’s development, its datasource will change. For example, sometimes the report is initially designed using data available on your local machine, but as the report nears completion, it is necessary to begin testing with data located on a production system.
Above message might also be accompanied by an assertion error when the report is viewed:
[11/16/06 10:51:56:821 CST] 0000003b SystemErr R Assertion Failed: Unknown TableType
[11/16/06 10:51:56:821 CST] 0000003b SystemErr R java.lang.Throwable
at com.crystaldecisions.reports.common.j.b.a(Unknown Source)
at com.crystaldecisions.reports.reportdefinition.datainterface.j.do
This can occur when the datasource information for all tables used in the report is not fully updated with the new database information. The message is a warning indicating that Business Objects recommends against mixing datasources within a single report. The correct way to go about using multiple datasources in one report is to group each separate datasource within a sub-report.
Solving Problem
To prevent this message from continually appearing, you should update the report tables individually to each point to the same datasource.
1. Open the Set datasource location… dialog
2. Expand your datasource, so that you see a list of all the tables used by the report
3. Select the table in the upper pane labelled Current Data Source
4. In the lower pane labelled Replace with, navigate to the corresponding table in the new datasource and select it:
5. Click the Update button on the right.
6. Repeat for each table in the report. In the example, this would be repeated for tables named: titleauthor and titles.
7. Click Ok to close the dialog
Each table now points to the same datasource location. The message box should no longer be displayed, and any assertion failures at runtime should no longer be reported.
Conclusion
We hope article above can help you if you encounter error message. If you are looking for Crystal Report hosting, please always feel free to visit our site.
Andriy Kravets is writer and experience .NET developer and like .NET for regular development. He likes to build cross-platform libraries/software with .NET.