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

CR XI - round value issue

Status
Not open for further replies.

campia

Technical User
Apr 20, 2007
77
BE
Hi,

I have issue by rounding a value with 2 digits but not with 3 digits after the ".", I show you what I have:

29,375 => 29,38
38,656 => 38,66

-------------------
68,031 =>68,03 (that's wrong because if you calculate it, the correct total should be 68,04)

I tried the 'round' function ( round(Sum ({@TotalDays}),2) )but I have the error "bad formula result".

can you help me?
thanks

André
 
Try
Code:
Round ((Sum({@TotalDays})), 2)
It is also easier to make use of Crystal's automatic totals rather than code them yourself. If you're not already familiar with Crystal's automated totals, see FAQ767-6524.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
i have already tried that and also the roundup function... but i have always the same error

André
 
I think you've misplaced your brackets and commas. But it would be simpler if you made a summary total and then invoked it.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Your round formula should be summed, not the database field.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
Don is correct. Note that the sum is NOT incorrect. It is actually the sum of the two numbers--it is just not displaying what you want to see, so create a formula:

round({@totalDays},2)

...and then insert a sum on that.

-LB
 
amazing... i still have the same problem.. it shows 68,03 and not 68,04

André
 
Then you implemented the solution incorrectly. Did you insert the summary on the formula and not the database field?

-LB
 
ok you were right it works now...
thanks

André
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top