NorthernViking
Programmer
Hi!
I have a project where we use Crystal Reports 9, and the problem I have is this.
I get a number value in from the database, which is 12.7605. Now, I've edited this by right clicking on the field in the report, choosing Customize... in the Format Editor under the Number tab.
I've set Rounding to 0.001. This works out OK, but the problem is this rounds 12.7605 to 12.760. This has raised some complaints, as the customer expect 12.7605 to be rounded to 12.761 (5 rounded upwards).
Now, I've tried adding a formula instead, taking this data field and doing Round(datafield,3). This gives me the expected result, 12.761.
I've read up a bit, and it seems to me that the Format Editor Rounding uses what's called banker's rounding (5 goes to the nearest even number, in this case 0), while the Round() function uses "normal" rounding.
Now, can anyone verify this? It seems weird to me that Crystal Reports uses different rounding standards for these two possible ways of rounding a number...
I can change this by removing all number fields from the report and adding formulas instead, but this is a lot of work and might cause unexpected results in the report.
Is there any way to force the Format Editor Rounding to not use banker's rounding??
Thanks you guys!
I have a project where we use Crystal Reports 9, and the problem I have is this.
I get a number value in from the database, which is 12.7605. Now, I've edited this by right clicking on the field in the report, choosing Customize... in the Format Editor under the Number tab.
I've set Rounding to 0.001. This works out OK, but the problem is this rounds 12.7605 to 12.760. This has raised some complaints, as the customer expect 12.7605 to be rounded to 12.761 (5 rounded upwards).
Now, I've tried adding a formula instead, taking this data field and doing Round(datafield,3). This gives me the expected result, 12.761.
I've read up a bit, and it seems to me that the Format Editor Rounding uses what's called banker's rounding (5 goes to the nearest even number, in this case 0), while the Round() function uses "normal" rounding.
Now, can anyone verify this? It seems weird to me that Crystal Reports uses different rounding standards for these two possible ways of rounding a number...
I can change this by removing all number fields from the report and adding formulas instead, but this is a lot of work and might cause unexpected results in the report.
Is there any way to force the Format Editor Rounding to not use banker's rounding??
Thanks you guys!