简体   繁体   English

当日期= '01 / 01/1900'时隐藏字段

[英]Hide field when date ='01/01/1900'

I am trying to hide a field in my report. 我正在尝试在报告中隐藏一个字段。 The following code gives me an error claiming "The formula result must be a Boolean" 以下代码给我一个错误,声称“公式结果必须为布尔值”

if 
totext((Date(Year({vPolicyPaymentData.Cheque_Date}),
            Month({vPolicyPaymentData.Cheque_Date}),   
              Day({vPolicyPaymentData.Cheque_Date}))), 'dd/MM/yyyy') ="01/01/1900" 
then
    "" 
else 
    totext((Date(Year({vPolicyPaymentData.Cheque_Date}),
                Month({vPolicyPaymentData.Cheque_Date}),
                  Day({vPolicyPaymentData.Cheque_Date}))),'dd/MM/yyyy')

To hide specific fields, right-click on the field and select "Format ..." where is field, formula etc. Go to the Common tab and click on the button next to "Suppress". 要隐藏特定字段,请右键单击该字段,然后选择“格式...”,其中字段,公式等在其中。转到“通用”选项卡,然后单击“抑制”旁边的按钮。 Enter a formula that evaluates to True or False. 输入计算结果为True或False的公式。 When true, the field will be suppressed: 设置为true时,将禁止显示该字段:

Cheque_Date = Date(1900, 01, 01)

You must return a boolean to avoid the issue. 您必须返回一个布尔值以避免出现此问题。 For more, refer to this link 有关更多信息,请参考此链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 当数据表中的日期时间为01/01/1900时,ListView中显示空字段 - Display empty field in ListView when Datetime in Datatable is 01/01/1900 c#-文本框日期值显示为01/01/1900 - c# - Textbox date value shows as 01/01/1900 datetime issue with 01/01/1900 - datetime issue with 01/01/1900 将无效日期转换为标准默认日期“ 01/01/1900” wpf datepicker C# - Turn invalid date into standard default date “01/01/1900” wpf datepicker c# 存储在数据库中的日期为NULL的日期返回为01/01/1900,而不是DateTime.MinValue。 - Date stored in DataBase as NULL is returned as 01/01/1900 and not as DateTime.MinValue 日期是01/01/0001而不是数据库中的日期? - Date is 01/01/0001 and not the date that is in the database? DateTime将日期显示为01/01/0001 - DateTime shows the date as 01/01/0001 从SQL结果集中替换01/01/1900并使用C#导出到Excel - Replacing 01/01/1900 from SQL resultset and exporting to Excel using C# 如果日期不是低日期,则仅包含在 where 条件中(01/01/0001) - Only include in where condition if date is not low date(01/01/0001) 如何在DateTime为空(01/01/0001)时将加载时的DateTimePicker对象保留为空白(选择日期),但在有值时填充该对象? - How to leave DateTimePicker object blank (Select a date) on load when DateTime is null (01/01/0001) but populate when there is a value?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM