Crystal Reports Stored Procedure Prompts Twice Runs Twice
Posted on 2009-04-07
I am working on some legacy Crystal Reports and was not around when they were created (they could have been created in Crystal Reports XI SP1 but we currently develop in Crystal Reports SP5 so these could have been initially created by SP1-SP5).
I have added some code to each of the Oracle Stored Procedures to audit every time they run to enable me to get stats on usage and time taken. Some of the reports are calling the same Stored Procedure twice (about 8 reports do this out of 50 I am working with and there appears to be no difference in the type of reports they are and none have sub-reports). I know this because there are two distinct entries in my audit table, one starting immediately after the other. When I run the reports , I get two 'Enter Values' prompts for the parameters, one after the other, prompting for the same parameters. It is almost as if it is verifying the data source before actually running the Stored Procedure but is actually carrying out the Stored Procedure run both times and returning records both times. The number of records is correct ultimately so it is not combining info, just doing a second call to the same Stored Procedure. I have looked at the Parameter fields and there is only one copy of each (so nothing obvious like duplicate parameters). There is only reference to one Stored Procedure in each report. If I rebuild the report again from scratch, it only runs once as I want but surely there must be something hidden in Crystal which is telling it to run twice which I can simply change to stop this happening. Any suggestions where I might look?