Hi Guys,
There is an issue while I was Print decimal values. For eg:- (It just an example)
I want to get an Amount call X from dividing SUM(CustLedgEntry.Amount) divided by SUM(CustLedgEntry.Quantity).
And One condition is IF the Both values getting divided are Zero the X value also want to be Zero. I wrote the Equation for get the divided value. If the both Values are Zero it prints "#ERROR". Can some one provide me a solution to escape from this issue.Any help will be appreciated.
0
Comments
viewtopic.php?f=32&t=49786
Did you not like the answer you you asked it again?
if value1 = 0 or value2 = 0
then result = 0
else result = value1/value2
then you use the variable "result" as the sourceexp of the textbox in your report.
http://www.BiloBeauty.com
http://www.autismspeaks.org
If it's urgent then you need to hire a professional to do it for you.
the advise here is free and you shouldn't expect anything within a specific time period.
If the answer you are looking for is "I'll do it for you for free" then this isn't the correct forum for you.
You've been given the direction you need to take, now you need to take that advice and try it yourself.
Just use your logic, this isn;t a difficult task to handle a zero value while dividing.
What part of the code in Belias' first post didn't help?
http://www.BiloBeauty.com
http://www.autismspeaks.org
Putting urgent in your message is not the right way to get a response in this forum.
Please see Forum Rule(s) #3.2: Forum Rules.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Value1 :=CALCSUMS(CustLedgerEntry.Amount);
Value2 :=CALCSUMS(CustLedgerEntry.Quantity);
IF value1=0 or value=0 then
X:=0
ELSE
X:=Value1/Value2;