Link to home
Start Free TrialLog in
Avatar of Ranjit_k
Ranjit_k

asked on

Crystal report repeatedly throws dialog box, prompting to select 'Use Saved Data' or 'Refresh Data'

Can somebody kindly help!
All of a sudden (since last two days) I am getting this dialog box asking whether to select "Use Saved Data" or "Refresh Data".
The dialog window title reads "Change in record selection formula detected". However, I am not at all modifying the Record selection formula or group selection formula. I am running the report from within the Crystal report IDE, and use atabase as Oracle.

To rule out options, the checkbox for 'Save Data with report' is unchecked both in 'Options' and 'Reporting Options'.
Avatar of lalitgupta_99
lalitgupta_99

Please check that in File Save data with report is unchecked in that particuler report .

As you say that for a new report you already uncheked the save data with report option in options

Best of luck

Lalit
Avatar of Ranjit_k

ASKER

Lalit,

'Save Data with Report' was in unchecked state already (in the current report too).
Hi.

Could you copy/paste record selection formula here please?

Good luck.
PW
Avatar of Ido Millet
The problem may be related to a subreport rather than the main report.  Do you have subreports in your report?

hth,
- Ido
Millet's guess is indeed correct that there are sub reports.

Winter, please refer the record selection formula for the main and sub reports geven below:

Main report:
{IR_GROUP_SUMMARY_DETAIL_VW.IRASSIGNEDDATE} >= {?Starting Date} and
{IR_GROUP_SUMMARY_DETAIL_VW.IRASSIGNEDDATE} <= {?Ending Date} and
{IR_GROUP_SUMMARY_DETAIL_VW.IRGROUPNAME} = {?Workgroup Name}

Sub Report 1:
{IR_TICKET_AT_VW.SWCOLUMNNAME} = "SWASSIGNEDTO" and
{IR_TICKET_AT_VW.SWOBJECTID} = {?Pm-IR_GROUP_SUMMARY_VW.IRHDCASEID}
and
(
If IsNull({?Pm-Max of IR_GROUP_SUMMARY_VW.IRREASSIGNEDDATE}) then
    True
Else
   ({IR_TICKET_AT_VW.SWDATECHANGED} <= {?Pm-Max of IR_GROUP_SUMMARY_VW.IRREASSIGNEDDATE})
)
and
(
If IsNull({?Pm-@Min Assigned Date to Group}) Or {?Pm-@Min Assigned Date to Group} >= CurrentDateTime then
    FALSE
Else
    {IR_TICKET_AT_VW.SWDATECHANGED} >= {?Pm-@Min Assigned Date to Group}
)


Sub Report 2:
{IR_TICKET_AT_VW.SWCOLUMNNAME} = "SWASSIGNEDTO" and
{IR_TICKET_AT_VW.SWOBJECTID} = {?Pm-IR_GROUP_SUMMARY_VW.IRHDCASEID} and
{IR_GET_NAME_VW.SWWKGRPID} = CDbl ({?Pm-IR_GROUP_SUMMARY_VW.IRGROUP}) and
{IR_TICKET_AT_VW.SWDATECHANGED} >= {?Pm-Max of IR_GROUP_SUMMARY_VW.IRREASSIGNEDDATE} and
If IsNull({?Pm-@Min Reassigned Date to Group}) OR (Length(cStr({?Pm-@Min Reassigned Date to Group})) = 0)then
    FALSE
Else
    {IR_TICKET_AT_VW.SWDATECHANGED} >= {?Pm-@Min Reassigned Date to Group}
ASKER CERTIFIED SOLUTION
Avatar of Ranjit_k
Ranjit_k

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Ranjit,

I believe your explanation is only semi-correct.  

The change in 'CurrentDateTime' is not due to the report running for a long time, but because 'CurrentDateTime' gets evaluated also by the subreport.  In other words, if you didn't have a subreport, the problem would not have occured even if the main report ran for a very long time...

This is an interesting (undocumented) behavior and I think it borders on being a bug.
In any case, a simple alternative solution is to pass the 'CurrentDateTime' as a link to the subreport instead of letting the subreport compute it on its own.

Cheers,
- Ido