[英]Delphi FireDAC TFDQuery DisplayFormat
I have some problems related to FormatOptions
. 我有一些与
FormatOptions
相关的问题。 I have a sales screen and after migrating to Firedac
(Previous was IBO
), full values (ex .: 100.00, 52.00) began to appear like this: 我有一个销售屏幕,并且迁移到
Firedac
(之前为IBO
)后,完整值(例如: Firedac
)开始显示为:
(IBO) 100.00 52.00 (IBO)100.00 52.00
(FireDAC) 100 52 (FireDAC)100 52
I tried to make use of MapRules
using the following configuration: 我尝试通过以下配置使用
MapRules
:
SourceDataType dtBCD
TagetDataType dtBCD
PrecMax 18
PrecMin 1
ScaleMax 5
ScaleMin 0
I actived the OwnMapRules
option, but the display remains the same. 我激活了
OwnMapRules
选项,但是显示保持不变。 So I tried to make use of fmtDisplayNumeric property
. 所以我试图利用
fmtDisplayNumeric property
。 Informing a ',0.00' fix my problem in parts, why limit the display to two decimals places, but there are fields that have more than 2 decimal places. 通知',0.00'可以部分解决我的问题,为什么将显示限制为两位小数,但是有些字段的位数超过2位。 Also, my Integer fields are showing decimal places on the display.
另外,我的整数字段还在显示屏上显示小数位。
I tried to create a rule in MapRules for Integer fields, but the problem remains. 我试图在MapRules中为Integer字段创建规则,但问题仍然存在。
What should I do in such cases? 在这种情况下我该怎么办?
Thanks in advance! 提前致谢!
MapRules had nothing to-do with display formatting. MapRules与显示格式无关。 It translates a driver data type into the data type you want to use in the application and vice versa.
它将驱动程序数据类型转换为您要在应用程序中使用的数据类型,反之亦然。
The IBO components have a specific behaviour for numeric fields. IBO组件对数字字段具有特定的行为。 They treat it as a currency field, depending on the numeric scale.
他们将其视为货币字段,具体取决于数字刻度。 See IBO documentation .
请参阅IBO文档 。
By default, Firedac uses the Regional Settings to format the output. 默认情况下,Firedac使用区域设置来格式化输出。 You can read how to change this behaviour in this paper .
您可以在本文中了解如何更改此行为。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.