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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rounding Formula Based field to Nearest Hundredth

Status
Not open for further replies.

Cheryl3D

Programmer
Mar 26, 2002
116
US
Hi:

I'm working on a report in Crystal Reports version 8.5. I have a formula field that calculates number fields (sums the two fields). Here is the formula:

Sum ({qryAnnex_View.NRCost}, {qryAnnex_View.Categories})+Sum ({qryAnnex_View.NRWorkyearCost}, {qryAnnex_View.Categories})

What is the correct syntax for incorporating the Round function - Round(x,#places) - into the formula above, if I want the calculated result to be rounded to the nearest hundredth?

For example, I have the number 104,728.95 want it to stay just that and not be rounded off to the nearst one which would be 104,729.00 (which is happening now in my report).

Would the correct syntax be something like?

Round(Sum ({qryAnnex_View.NRCost}, {qryAnnex_View.Categories})+Sum ({qryAnnex_View.NRWorkyearCost}, {qryAnnex_View.Categories}),.#00)

Any advice is greatly appreciated.

Thanks,
Cheryl

 
Right click on the summary field->format field->number->and select
"-1,123.00".

-LB
 
It is probably a display problem rather than a rounding problem. Check your display format. Crystal doesn't generally round things off for you, but will keep totally insignificant amounts of digits. Try putting just 123456123456.98 in a formula. Crystal will display the whole thing..

Lisa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top