简体   繁体   中英

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. When true, the field will be suppressed:

Cheque_Date = Date(1900, 01, 01)

You must return a boolean to avoid the issue. For more, refer to this link

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM