Display round off value in Crystal Reports in ASP.Net

Last Reply 9 months ago By kalpesh

Posted 9 months ago

Hello,

I have used Round function in crystal report and it also worked but now I have to show rounded value in one field of report.

My formula is = Round({@GrandTotal})

E.g.-

If GrandTotal is 2501.60 then after rounding It prints Grandtotal as 2502

then I want to show the rounded value means in this case-

GrandTotal - 2501.60

AfterROunding - 2502

RoundedValue - +0.40

How to get this rounded value (+0.40) from crystal report formula.

 

Thanks in advance

 

You are viewing reply posted by: kalpesh 9 months ago.
Posted 9 months ago

You just need to minus the Round amount from GrandTotal Amount.

But Formatting supports not to show + sign it may show you either 0.30 also -0.30 as positive and negative value from Custom format. I used The below Question to Make RoundAmount calculation as per your requirement Just check it and implement your Formula in your code as per your logic.

Rounding Off formula field values In Crystal Reports using C# in ASP.Net

I have created RoundAmount as Formula to calculate Round Amount and added in same Report also added actual amount from Field to show the difference.

Formula

Round (CCur({DataTable1.Freight}),0) - CCur({DataTable1.Freight})

Formatting Formula Field to Report.

Output