Complex Math Expression in Variable

Posted by: Processor

Complex Math Expression in Variable - 02/13/14 06:30 PM

I have a LARGE database that exceeded the number Data fields, so am having to do some Math in some created Variables. This is for a yearly donations summary with anywhere from 1 to 74 donations listed on the print.

I created a variable 74 variables to subtract an amount and get a result.
EXAMPLE: @DDBL 26@ is VAL ([Amnt 26]) - VAL ([Nontax amnt 26])

Unfortunately, this person only donated 25 times last year and as a result instead of 50 blank lines I am getting 50 rows of $0.00 listed.

I tried to create an expression where if @Date 26@ is blank then result "" (blank), but if @DATE 26@ is not blank do @DDBL 26@, but it isn't liking that.

How can I do the Math of date is present, but blank result if no date?
Posted by: RobertOtis

Re: Complex Math Expression in Variable - 02/18/14 09:20 AM

Dear Processor,

This is the right spelling for the if condition:
IF(@Date26@="", "", @DDBL 26@).
this should put Blank if @date26@ is empty.or else it will put the value off @DDBL 26@
Posted by: Processor

Re: Complex Math Expression in Variable - 02/19/14 12:17 PM

It says "String Expected"

@DDBL 26@ is just a variable. It isn't an actual field in the database. I think that is the problem.

I don't know how to get it into a real expression.

For now I ended up just created 50 different templates for the different versions needed and deleted any unnecessary fields (e.g. IF ([# of donations]= "1",Print,Skip).

Works for now, but would love to figure out how to do it in an expression.