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!

Formula Problem

Status
Not open for further replies.

parrotheadman

Programmer
May 8, 2002
15
US
I have written the following formula:
if {vLOIS1.DispCode}<>1 and {@15Days}<>1 then 1 else 0;

While this works fine, my problem is adding a 3rd parameter to this formula. As soon as I add the following, I stop getting results:
if {vLOIS1.DispCode}<>1 and {@15Days}<>1 AND {@COMMIT}<>1 then 1 else 0;

While at first I thought this might be a problem with the expression itself, I have substitued {@commit} with {@15days} and the formula works well. But it only works well when there are 2 parameters. When I add the 3rd parameter(and it doesn't matter which field I add), the formula completely breaks down. ANY IDEAS?
 
Please show the formulas for @15days and @commit Software Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
@committed=if (DATE(YEAR({vLOIS1.ComKeyDate}), MONTH({vLOIS1.ComKeyDate}),1) = DATE(YEAR(currentdate), MONTH(currentdate),1)) and {vLOIS1.DispCode}=0 then 1 else 0

@15days=if (currentdate - {vLOIS1.AppkeyDate}) > 15 and {vLOIS1.DispCode} = 0 and {@Committed}=0 then 1 else 0
 
Your original post said @commit, the formula is for @committed? Probably just a typo.

Anyway, 3 conditions in an if works, so it may be that you aren't getting any data because there isn't any that meets the criteria.

-k kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top