如何格式化报告中的数字?
我的报告中有一个计算得出的双价格字段,有时其值例如为 1.23456。
我的报告中的每一行都有以下数据:产品名称,后面是括号中的价格。
=[ProductName] & ' (' & [Price] & ') '
如何在报告设计中对上述表达式中的价格进行格式化,以便价格始终具有以下格式:1.23?意思是小数点后始终有 2 位数字。
谢谢。请注意,我想在报告设计中执行此操作,而不是表创建或计算。
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.
Thanks. Please note I want to do this at the REPORT DESIGN, not table creation or calculation.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您转到“报表设计”视图并右键单击要设置格式的字段,请打开属性菜单。
在“属性”窗口的“格式”选项卡下,有 2 个选项
您可以在“格式”选项中选择“货币”或“普通数字”,然后在“小数位”选项中输入 2。
根据您的编辑,您可能可以执行以下操作,我还没有机会对此进行测试。
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
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.