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'.
LVL 1
Ranjit_kAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

lalitgupta_99Commented:
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
Ranjit_kAuthor Commented:
Lalit,

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

Could you copy/paste record selection formula here please?

Good luck.
PW
Expert Spotlight: Joe Anderson (DatabaseMX)

We’ve posted a new Expert Spotlight!  Joe Anderson (DatabaseMX) has been on Experts Exchange since 2006. Learn more about this database architect, guitar aficionado, and Microsoft MVP.

Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
The problem may be related to a subreport rather than the main report.  Do you have subreports in your report?

hth,
- Ido
Ranjit_kAuthor Commented:
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}
Ranjit_kAuthor Commented:
I have singled out the reason for this issue to using 'CurrentDateTime' in the Report selection formula.

The CurrentDateTime changes while the report is still running, due to large number of records. Since Crystal report detects a change in the 'Record selection formula', it prompts whether to use the saved data or to refresh.

I modified the Record selection formula of one of the sub reports to use 'CDateTime(PrintDate,PrintTime))' instead of 'CurrentDateTime', and it no longer throws the dialog box.

Note: I thank all the friends who responded to this issue. However, I will not be giving points for this, as I got the solution by myself :)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.