IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#46749 - 02/13/14 06:30 PM Complex Math Expression in Variable
Processor Offline
OL Newbie

Registered: 02/13/14
Posts: 2
Loc: California
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?

Top
#46783 - 02/18/14 09:20 AM Re: Complex Math Expression in Variable [Re: Processor]
RobertOtis Offline
OL User

Registered: 08/26/13
Posts: 90
Loc: Montreal,Quebec
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@

Top
#46803 - 02/19/14 12:17 PM Re: Complex Math Expression in Variable [Re: Processor]
Processor Offline
OL Newbie

Registered: 02/13/14
Posts: 2
Loc: California
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.

Top