Logically sound, syntactically inept - report builder question

Either

IIF(TotSalePrice = 0,0,(TotSalePrice - TotalJobCost) / TotalSalePrice) *
100)

Or

IIF(TotalSalePrice > 0,(TotSalePrice - TotalJobCost) / TotalSalePrice) *
100,0)

Michael

Michael Barry
Aspacia Systems Inc
866.566.9600
312.803.0730 fax
http://www.aspacia.com/


-----Original Message-----
From: Lee Ingalls [mailto:eli3@...]
Sent: Thursday, January 29, 2004 1:21 PM
To: Vantage user forum (E-mail)
Subject: [Vantage] logically sound, syntactically inept - report builder
question

Hai all,

Looking for an assist on a tricky report builder "IIF" calculation...
I have a working 'Profit Ratio' calculation that is as follows:

((TotSalePrice - TotalJobCost) / TotalSalePrice) * 100

This works fine unless the TotalSaleProce = 0 (no charge - rework type
jobs/repairs) where you can not divide by zero...

I believe I can use IIF to check for the 0 SalePrice condition:
IIF((TotalSalePrice = 0, TotalSalePrice + 1 etc etc.
I'm lacking a decent example to allow the calculation to process normally
when TotalSalePrice > 0 and TotalSalePrice = 0

HELP!

Regards, Lee
Commercial Tool Group

Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and
Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/links

------------------------ Yahoo! Groups Sponsor ---------------------~--> Buy
Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark Printer
at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/PhFolB/TM
---------------------------------------------------------------------~->

Yahoo! Groups Links

To visit your group on the web, go to:
http://groups.yahoo.com/group/vantage/

To unsubscribe from this group, send an email to:
vantage-unsubscribe@yahoogroups.com

Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Hai all,

Looking for an assist on a tricky report builder "IIF" calculation...
I have a working 'Profit Ratio' calculation that is as follows:

((TotSalePrice - TotalJobCost) / TotalSalePrice) * 100

This works fine unless the TotalSaleProce = 0 (no charge - rework type jobs/repairs)
where you can not divide by zero...

I believe I can use IIF to check for the 0 SalePrice condition: IIF((TotalSalePrice = 0, TotalSalePrice + 1 etc etc.
I'm lacking a decent example to allow the calculation to process normally when TotalSalePrice > 0 and TotalSalePrice = 0

HELP!

Regards, Lee
Commercial Tool Group