gpt4 book ai didi

delphi - 如何在FastReports中使用IIF函数?

转载 作者:行者123 更新时间:2023-12-01 16:15:38 24 4
gpt4 key购买 nike

我有一个包含整数值的字段(仅限 1 或 0),如果该字段包含 0,我想在报告中打印“男性”;如果是 1,则打印“女性”。

这是我到目前为止所做的,但不起作用:

[IIF(<ReportPersonal."civilStatus"> = 0, 'Male', 'Female')]

尽管 civilStatus 字段的值为“1”,但该代码始终打印“Male”。

这是Link to the report file

非常感谢我们的专家。

最佳答案

在 MemoView“ReportPersonalcivilStatus”中有:

DisplayFormat.FormatStr="False,True" DisplayFormat.Kind="fkBoolean". 

尝试将备忘录->格式设置为文本(无格式)

关于delphi - 如何在FastReports中使用IIF函数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34551608/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com