Tuesday, October 16, 2012 8:01 AM
Need your help on the below.
I am working on a C# Project where in I am using Crystal report to print a TAX INVOICE.
I want to know how can we show rounded off value.
Bill Amount is Rs. 3000.34
Tax Amount is Rs. 345.56
Total Bill will be Rs. 3345.90
Now here i know how to round off the Total Bill Amount but i need to show 0.90 paisa which i will be rounding off on the bill so can you help me on that please.
How do i get the rounded off value ( which is 0.34 + 0.56 = 0.90 paisa ) in this case.
Tuesday, October 16, 2012 10:41 AM
If you'd ask for Small Basic, I'd say:
leftover1 = Bill - math.floor(bill)
leftover2 = Tax - math.floor(tax)
roundedOffValue = leftover1 + leftover2
Maybe in C# you have to use "int" instead of math.floor()
I changed my password to "incorrect", so whenever I forgot what it was, the computer will remind me: "Password is incorrect"
- Edited by Rene_Miner Tuesday, October 16, 2012 10:43 AM
- Proposed As Answer by Ed Price - MSFTMicrosoft Employee, Owner Tuesday, October 16, 2012 9:30 PM
- Unproposed As Answer by macIsThereToHelpYou Wednesday, October 17, 2012 7:35 AM
- Marked As Answer by macIsThereToHelpYou Wednesday, October 17, 2012 7:37 AM
Wednesday, October 17, 2012 7:36 AM
It was so simple....I think i just needed a extra head to think :)
Thanks Rene !
- Edited by macIsThereToHelpYou Wednesday, October 17, 2012 7:37 AM