cancel
Showing results for 
Search instead for 
Did you mean: 

Cross-tab Calculated Member Rounding Issue

former_member605501
Discoverer
0 Kudos

I am attaching a sample image that showcases the issue.

On the top cross-tab, a calculated member was used to display the total, which worked fine as long as the rate was not a float (decimal). As soon as the rate changed to a float, I noticed that the value is being rounded down, regardless of how I choose to format the field.

On the bottom cross-tab, the "Correct Total" is calculated by using the actual row summary and changing the display string to perform the calculation.

Both cross-tabs are basically using the same values for their "Total" calculation, but the top one is rounding it down.

Crystal Reports 2013 Support Pack 1

Version 14.1.1.1036

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member605501
Discoverer
0 Kudos

Hi Dell,

Thanks for the prompt response.

To answer your first question, this is just via Crystal itself and not part of a BI platform.

I updated to SP 12 and also implemented the work around on the round formula but the results are the same.

I am not all that concerned about it, since I am able to get the right numbers by using the built in row summary as shown in the second cross-tab, this post is more of an FYI to SAP that there appears to be a bug in the system.

I don't think it should matter if the calculated member is a count or a sum, it is a number and if multiplied with a float should produce a float and not force the value to be round down.

I know that many posts have been made regarding similar rounding issues on much earlier releases of CR, I just figured that by this time all these quirks would have been ironed out already.

The ability to add a calculated member is very useful, and it would be a shame to be forced to stop using it due to rounding scenarios.

DellSC
Active Contributor
0 Kudos

Are you just using Crystal or are you running Crystal through the BI Platform? If you're just running Crystal, I recommend that you install the latest support pack for Crystal 2013, which you can get from here: https://origin.softwaredownloads.sap.com/public/site/index.html.

If that doesn't solve the problem, you could try changing the calculated member to something like this:

Round((GridValueAt(CurrentRowIndex, GetColumnPathIndexOf(), CurrentSummaryIndex) + .0001) * {@Rate})

I think Crystal might be looking at the Count field that you're using and assuming that it needs to to integer math instead of floating point math. So, by adding a tiny amount to make the first value a float and then explicitly rounding, you may be able to get the results you're looking for.

-Dell