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

Do not perform calculation

Status
Not open for further replies.

bryhall2

Programmer
Jul 5, 2006
5
US
Creating a formula that I then insert a summary on. When using if statements, if the criteria does not match, I want the result to display nothing, instead of 0. How do I do this?

Ex:

if {Notes.ActCode} <> "BILL_HOLD_UNNEC" then Currentdate - {Notes.StartDtAct}

If the result of Notes.Actcode <> "BILL_HOLD_UNNEC", the formula will display 0, which in turn skews my summary.

Any help would be appreciated.
 
What kind of summary are you inserting? Are you saying you don't want the zero's calculated? You could use a running total of a formula:

Currentdate - {Notes.StartDtAct}

...and in the evaluation section choose "use a formula":

{Notes.ActCode} <> "BILL_HOLD_UNNEC"

There is another method that might work, depending upon what you are trying to do:

Create a new formula {@null} by entering nothing in the formula area and saving and closing it. Then change your formula to:

if {Notes.ActCode} <> "BILL_HOLD_UNNEC" then Currentdate - {Notes.StartDtAct} else tonumber({@null})

This would work if you were inserting counts or distinctcounts.

-LB
 
LB,

Thank you much for the help. I did not think of a tonumber trick combined with a blank formula. This worked well.

The running total did not work, because of grouping problems. It would not compute all together if "BILL_HOLD_UNNEC" was found. The goal was to skip over this record instead of all of the records for that group.

Once again, thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top