The Saved Data Trap

Monday 30 October 2006 @ 9:33 pm

Crystal Reports has a handy option of allowing you to save data with a report. This allows you to view and even modify a report without having access to the source database. CR does this by saving the necessary records and fields as part of the RPT file.

My only problem with this feature is that when you first install Crystal the feature is set to ON by default. This means that unless you shut this feature off, every new report will be saved with the last records viewed. This not only wastes space, it can cause confusion for both developers and end users. I am often asked why reports always show the same data, only to find that the user is looking at old data.

You shut this feature off in 2 different places. To turn it off (or on) for an existing report you open that report and go to File – REPORT options. This must be done one report at a time. To change the global default that controls all new reports, go to File – Options, and select the Reporting tab. This affects all reports created from now on. I recommend that this be off in general and turned on in individual reports when needed.

What I really like about this feature is how it allows me to develop or modify reports for remote users without having to connect to their database. Users can send me an existing report, or an initial draft of a new report, saved with data. I can then do 95% of the report’s development without having to create a connection. The only things that I can’t do include adding new fields to the report or refreshing the data. The FAQ page of my site explains how to save a report with data and then how to confirm that the data is saved.

Now sometimes when a developer shuts this feature off in a report they start to get new errors when they try to run the report from the application. This is actually good news. It means that now the report is TRYING to connect to the database (and failing). But at least it is trying. Now you can troubleshoot your connection code.

One Response to 'The Saved Data Trap'

  1. Jeremy Stein - December 6th, 2006 at 12:35 pm

    Good tip. I always turn this off in reports, but now I’ll go turn it off globally. Thanks!

Leave a Reply

Recrystallize Pro