Thursday, March 8, 2012

Crystal Report - subreport - old data (PLEASE HELP !)

**Note - I'm developing with version 6.0 of Crystal Reports

I am adding a simple subreport to an existing report.
The existing report runs perfect with no problems.
It was when I added the subreport that the problem began.

The MAIN report retrieves from a stored procedure.
The subreport is linked from a field on the MAIN report to a table on the dB.

The first time I run the report, the report runs fine and displays data for the 1st parameters chosen from the screen. (pauses for a second - appears to be hitting the dB)

The second time I run the report, the report runs fine and displays data for the 2nd parameters chosen from the screen. (pauses for a second - appears to be hitting the dB)

The third time I run the report, the report runs, BUT displays the parameters chosen from the second run(old data). (doesn't pause at all, the report appears quickly - is not hitting the dB to run the stored procedure to refresh the data with new parameters chosen from the screen.)

I've tried setting cache to zero in the code and I've tried adding a field to the report which shows the surrent server time. Nothing has worked.

Is this a cache problem ? - i'm thinking maybe so, since the report runs correctly TWICE then suddenly not.
ANY suggestions about how to fix this ?? What other possible things can I try that might clear the cache ?

thanks !!!!
~JackiOpen the Report; Goto File and uncheck the option "Save Data with Reports"

No comments:

Post a Comment