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

Display Alert

Status
Not open for further replies.

granny1

Technical User
Jun 24, 2001
24
US
I need to display an alert if this period total=0. I have the following formula if Sum ({@ThisPeriodIncidents})=0 then"Complaint" (Complaint being the Alert) it does not display when sum is 0. Any ideas.
 
I don't know if any of these fields account for decimals:

What happens if you change your sum criteria to sum({field}) < 1?

Naith
 
if return value is 2 and you have < 3 it works but if you have < 1 and it doesn't return a value it doesn't display. I tried isnull and that did not work.
 
I think what Naith is after is the exact definition of zero. That is does the sum have to be exactly zero or can there be a tolerance say.... 0 +/- .001.

This would reduce the chance of rounding errors being a problem.

As far as the &quot;alert&quot; is concerned...just create a text field with the word &quot;Compliant&quot; as the text. Place it at an appropriate place...I often give it a yellow background to highlight it a bit.

In the conditional suppress in the Field editor of this field put the formula:

WhilePrintingRecords;
Sum({@ThisPeriodIncidents}) = 0 ;

if you want to give it a tolerance the frmula might be

WhilePrintingRecords;
evaluateAfter (Sum({@ThisPeriodIncidents}));
Sum({@ThisPeriodIncidents}) >= -.001 and
Sum({@ThisPeriodIncidents}) <= .001 ;

this should work Jim Broadbent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top