Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Constantly refreshing reports !

Status
Not open for further replies.

FoxG

Technical User
Joined
Jun 1, 2001
Messages
393
Location
GB
Hi,

Is anyone else aware of a quirk when using currentdate in the record selection formula. Every time I read a new page it prompts to refresh the report.

I seem to have found a solution!

Don't use currentdate in the record selection !!

Add a formula
BeforeReadingRecords;
currentdate

Then use this in the record selection formula.

If anyone else has come across this please let me know.

Best wishes,
Geoff

 
Hi Geoff;

I am recently using CurrentDate in my Record Selection with none of the problems that you describe and mine is a 200-500 page report depending on the look and parameter values

I just use it like this
...
{table.val_DT} > currentdate and
...

where {table.val_DT} is an oracle date value

God! at 200 pages it would be a nightmare to refresh everyone...I can zip around the group tree like normal...What are you doing different???

BTW I use Crystal 8.0 and my reports are simple table linkages + record select (with formulas sometimes)
 
Hi,

Most of my report use currentdate too (with no problem).

It just seems to happen on one or two reports.
Maybe there is something else that is causing it.
However this fix did work for my report!!

Geoff
 
Hi Geoff....is there more to this story???

"BeforeReadingRecords;
currentdate
"

this formula doesn't seem to select any records to me :-)

I'll bet I know....you have some time dependant formula where a field must be EQUAL to the currentdate. So Crystal as it goes from page to page re-evaluating the formula and must refresh to get the newest currentdate value

It has nothing to do with currentdate being in the record select....possible??

Jim
 
Not sure why but ...

By changing the record select expression from ...

EvaluateAfter({@voting type};
stringvar p:= left({?Gov_body},1) +
left({?Gov_position},1) + left({?Gov_type},1);
(if p = "***"
then {@voting type}
else ...)

where {@voting type} is :-
not({GOV_LINK.GOV_TYPE} in ["CLK","NHT","OBS"])

to....

(if (left({?Gov_body},1) +
left({?Gov_position},1) + left({?Gov_type},1)) = "***"
then not({GOV_LINK.GOV_TYPE} in ["CLK","NHT","OBS"])
else ...)

appears to have fixed it.

Thanks to Ken and Ngolem for their suggestions
 
Looks to me that your formula {@voting type} had a time dependant element to it which was forcing the refresh

I had a similar problem when I used currentDateTime in a record selection by mistake...
 
I think it it something to do with actually using a formula in the record selection criteria.

Is there anything that says you shouldn't?

Geoff
 
I do it all the time...it forces a second filtering of the data...slowing down the speed of the report but since I cannot create proper SQL yet and must depend on simple linking/record selection I have no choice (my stuff is being used on the web but we cannot use ASP or active components ) CR 8.0 Professional {sigh}

The only time I had problems with a formula was when there was a "time" component in it...."date" components were fine but "time" components in the formula in the record select forced a referesh on every page change

jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top