Can someone help me with a crystal report formula issue?

21 Views Asked by At

I am trying to use this formula and it works except it won't work return anything when my payment is 0. I have tried 0.00. I looked up the data filed in sql and it shows numeric (8,2), not null. Any ideas of what I am doing wrong?

if {VMMTICKEH.CMMUPMOD}="AR" and{VMMTICKEH.PAYMENT}={VMMTICKEH.NSALESAMT}then {VMMTICKEH.NSALESAMT} else if {VMMTICKEH.CMMUPMOD}="AR" and{VMMTICKEH.PAYMENT}>{VMMTICKEH.NSALESAMT}then if {VMMTICKEH.CMMUPMOD}="AR" and{VMMTICKEH.PAYMENT}>{VMMTICKEH.NSALESAMT}then{VMMTICKEH.NSALESAMT}+{VMMTICKEH.PAYMENT} else if {VMMTICKEH.CMMUPMOD}="AR" and {VMMTICKEH.PAYMENT}= 0 then {VMMTICKEH.NSALESAMT} else if {VMMTICKEH.CMMUPMOD}="CL" then {VMMTICKEH.NSALESAMT} else 0

1

There are 1 best solutions below

0
MilletSoftware On

Simplify the situation to make it easier to troubleshoot:

  • Identify 1 record where the result of the formula is not what you expect.
  • make the simplest formula that should return the value you expect for that record

at that point, the problem & solution would probably become clear to you. If you still don't see the solution, post an update here providing

  • the new simple formula
  • the input value(s) to the formula for that record (if you don't know what they are, place those components on the report canvas so you can see them)
  • the expected output from the formula, and
  • the actual output from the formula.