I have a crystal report which calls a stored procedure. This procedure is in OLAP database which makes internal calls from EPM database. This procedure has a refcursor returning the result set from a Temp table. I have mapped the columns on my report to the fields from this temp table.
The report works fine when its an on demand execution. When I schedule the report, my report order gets messed up. I used to get duplicate records which i have eleiminated by suppressing the line comparing with the next record.
The report order cannot be changed as the order is presorted because of the heirarchial fields which is taken car by the stored procedure. I tried to find the root cause for this and found that the stored procedure is being called twice when scheduled the report and only once when performed an ondemand execution. Even when executed from CMC, the stored proc is being called twice which messes up the ordering. Even though the number of pages returned is same in both the cases, The order is different and even found that the file size is different when exported to RPT file. Any idea as to how to get rid of this issue.
All your suggestions are highly appreciated.
I tried refreshing the temp table,replacing the temp table with a physilcal table,nothing works.
Thanks,
Kiran