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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Failing a Report 2

Status
Not open for further replies.

dscoiho

MIS
Sep 26, 2005
51
US
I am current using Crystal 10, Crystal Enterprise and the data is connected through ODBC. What I am trying to do is make a report fail if the date field hasnt been updated to the current date. Unless there is a nice way through Crystal Enterprise if the current date has not been updated don't run a report.
 
The report has to run to check the data. You could have
Code:
{your.date}=currentdate
To make it clear when the report had run and found nothing, have a section saying '*** No Data ***'. Conditionally suppress it: right-click on a section and choose Section Expert. Then choose the formula icon (x+2 and a pencil) for suppression. Enter a formula; e.g.
Code:
not isnull({your.account})


[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
I did find your suggestion very useful, but not sure how this would stop the report if the date hasn't been updated.
 
I used your suggestion but not sure how this would stop a report from running.
 
It is not clear what date needs to be updated to the current date.
Do you mean that none of the records in the table have the current date in them? If so, the report has to run and read all the records to determine if any records do contain the current date.
Is the date hard coded in the report selection formula? Madawc's suggestions above will address both of these issues.
MrBill
 
Sorry about the double post connection was acting up and didnt seem to take. Madawc's post helped me toward my solution which was use section expert but divide by zero to fail the report (which I still need to test). The table I am checking to see if datefield current is a 500 record table and the datefields are updated at once.
 
'Divide by zero' is likely to get reported as an error and then 'hang' indefinitely till you manually close the report. That's what it does on my machine, once you find a work-round to get it pass the editor.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
I'm having a similar CurrentDate problem: I have a report that is grouped by CurrentDay-1, MTD and YTD. It runs fine for the day that its scheduled but when you go back to look at a previous day's report it only show MTD and YTD - the old CurrentDate -1 no longer shows up - but you can find that day's record under MTD. It no longer groups it out. Any ideas?
 
The date has changed, it's no longer currentdate.

How do you group by currentday-1? I assume that you mean currentdate. Do you use {table.date} = currentdate?

Try changing to datadate-1 or printdate-1, seems one or both of those resolved these types of issues.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top