How to format NUMBERS in report?
I have a calculated double Price field in my report that sometimes have a value such as 1.23456.
Each row in my report has these data: Product name followed by Price in parentheses.
=[ProductName] & ' (' & [Price] & ') '
How do I format the Price in the above expression IN THE REPORT DESIGN so that Price always has this format: 1.23? Meaning always having 2 digits after the decimal point.
开发者_Go百科Thanks. Please note I want to do this at the REPORT DESIGN, not table creation or calculation.
If you go to the Report Design view and right-click on the field that you want to format, open the properties menu.
Under the Format tab on the Properties window, there are 2 options
Format
Decimal Places
You could select Currency or General Number in the Format option and put 2 in the Decimal Places option.
Based on your edit you might be able to do the following, I haven't had a chance to test this.
=[ProductName] & ' (' & FormatNumber([Price], 2) & ') '
精彩评论