问题标签 [openrpt]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
660 浏览

string-formatting - 如何将千位逗号分隔符添加到此字符串格式:(%0.2f)?

在此处输入图像描述

我正在使用 OpenRPT 报告编写器,并尝试为字段添加千位逗号分隔符,他们提供的示例是 %0.2f,我认为这是 Python 语法。这是将值格式化为具有 2 位精度的浮点数;但是,我没有千位逗号分隔。如何调整格式掩码以允许千位逗号分隔?我附上了对话框的图像。

样本输入:16119.20

期望的输出:16,119.20