But what if you want to display the actual number? If the original number has no decimal places, you want to see that. If the original has three decimal places, you want to see all three.
You can do this using conditional formatting.
- Right click on the number field and select Format Field from the pop up menu. You see the Format Editor dialog.
-
On the Number tab, click the Customize button. You see the Custom Style dialog.
-
On the Number tab, click the Conditional Format button next to the Rounding option. Enter the following formula:If CurrentFieldValue = Int(CurrentFieldValue)
Then 0
Else
If
CurrentFieldValue * 10 = Int(CurrentFieldValue * 10)
Then 1
Else
If
CurrentFieldValue * 100 = Int(CurrentFieldValue * 100)
Then 2
Else
If
CurrentFieldValue * 1000 = Int(CurrentFieldValue * 1000)
Then 3
Else
If
CurrentFieldValue * 10000 = Int(CurrentFieldValue * 10000)
Then 4
Else
DefaultAttribute
- Click on the Conditional Format button next to the Decimal option and paste the same formula.
-
Click on OK twice to return to your report and view your formatting changes:
No comments:
Post a Comment