Crystal Reports has a handy option of allowing you to save data with a report. This allows you to run or view a report without having access to the database that the data was drawn from. CR does this by saving the necessary records and fields as part of the RPT file.
The problem is that when you first install CR this feature is ON by default. This means that until you shut this feature off, every report is saved with the last records viewed. This wastes space, and causes a great deal of confusion for developers.
The test to see if your report has saved data is simply to close it and reopen it in the report designer. If it immediately goes to preview, then you have saved data. If it opens in design mode, then you don't have saved data.
To shut the feature off you have to go to 2 different places. To shut it off (or back on) for an existing report you open that report and go to File - REPORT options.
To change the global default for all new reports created you go to File - Options, and select the Reporting tab.
Now, when you shut this off, you might get a new error when you run your report from your VB application. That is actually good news. It means that now your report is TRYING to connect to the database (and failing). But at least it is trying.
Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and eBooks.
http://www.kenhamady.com/
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.