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

surpress zeros

Status
Not open for further replies.

Tech2377

Programmer
Nov 13, 2007
81
I have a client using Peachtree 2007 along with Crystal Reports 9.2.3. I've created many reports testing for zeros and other information but in an older version of Crystal and Best Software.

What we want to do is supress zero information based off of testing on one field. If field <> 0 then use the data else bypass. How do I add the bypass routine into this scenario. Would I use a True or False?

Same thing for a date range check or end date.

Sample code that didnt work.
If {@AgingBracketTotal} = 0 then True else False
 
Then use what data? Are you trying to suppress a field or a section? Suppress the current field or a different field based on the current field?

-LB
 
You could say
Code:
If {@AgingBracketTotal} = 0 then "True" else "False"
Much easier to say
Code:
{@AgingBracketTotal} = 0
The second is an example of what's called a Boolian in Crystal, it will print True or False if placed on the report (or will be blank if it hits a null).

Once set up as a boolian, a formula can be referenced by name, e.g.
Code:
If @YourTest then .... else ....

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
lbass:

Yes, I'm trying to suppress a record if one specific field is not equal to zero. Do you have an example routine in which I could see?
 
Then you would use section suppression. Go into the section expert->details->suppress->x+2 and enter:

{@AgingBracketTotal} = 0

If this doesn't work, then you should show the contents of the formula. It probably means that what you think is zero is really some small number, so you might also want to try:

round({@AgingBracketTotal}) = 0

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top