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!

use if,then,else to set field null or currency

Status
Not open for further replies.

jmeckley

Programmer
Jul 15, 2002
5,269
US
I have a simple formula that will find the difference between 2 fields. if the information is correct the value will be 0 (zero). If the iformation is not correct there will be a non zero number. I am using the following formula:

if {#ReceiptTotal}-{@JM-HorizontalSum} = 0 then
//i want this to be null
else
{#ReceiptTotal}-{@JM-HorizontalSum}

it says i have to have a value where my comment is and that it cannot be null. is there a way to do this? I am using Crystal 8.5 for BlackBaud

The reason for this is to make it easier for the user to find the differences. Jason Meckley
Database Analyst
WITF
 
Keep your formula like this:

{#ReceiptTotal}-{@JM-HorizontalSum}

Then just format this field to suppress if zero.

Software Sales, Training and Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
I do not want to surpess the entire record if the value is zero because the "ReceiptTotal" is used for a comparison against an accounting report. Jason Meckley
Database Analyst
WITF
 
We found a solution to the problem. We replaced the default value with a dash (-) this produces the effect we were looking for. Jason Meckley
Database Analyst
WITF
 
I did not say supress the entire record, I said supress the ONE FIELD if it is zero. Software Sales, Training and Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top