Reputation: 1
Is there anybody who can help me out with a Crystal Reports question? I did a groupresult as average. The Option Average from the groupresults shows me per example 4.3, 5.4, 6.3.
The question is, if there are some options to round these results from the groupsum to
4.3 -> 4.5,
5.4 -> 5.5,
6.3 -> 6.5.
I tried the formula round(x,y) operator but it is not working well. The round function does not show me the correct results, because I try to round up the Groupingresult. And If I click on the field edit Groupresults (Running Total) I can just choose round to decimals. But if I do so, it will show me 4.3, 5.4 and 6.3 as examples. A not 0.5. For my case, the group result shall be calculating the average and rounding it up to half degrees.
here the code i got in group results: Round (average({Orders.SumOrders}), 1)
Thank you very much for your help :)
Upvotes: 0
Views: 44
Reputation: 4026
Assuming your running total is called {#RTotal1}, you can simply create a new formula like:
mround({#RTotal1}, 0.5)
and place that formula on the report canvas.
Upvotes: 0
Reputation: 4026
The simplest solution is to use the mround() function.
For example, mround(4.3, 0.5) would result in 4.5
Upvotes: 0