What is wrong with this?
if ({@DBSCheck}) = 'No' then 'NA' else ({MembersDetails.DBS Expiry Date})
it says a string is required after else
Crystal Reports
Last Comment
Gordon Hughes
8/22/2022 - Mon
Raghavendra Hullur
Hi,
Your else condition seems to be returning a date data type as the field suggests.
You need to typecast the date to a string using cStr({MembersDetails.DBS Expiry Date}) or cStr({MembersDetails.DBS Expiry Date}, <required date format for e.g MM/dd/yyyy>)
Hope that helps.
Gordon Hughes
ASKER
Hi
I have modified the formula to
if ({@DBSCheck}) = 'No' then 'NA' else cStr({MembersDetails.DBS Expiry Date})
It partially works
what do I need to add to only see dd/mm/yyy not any hours
Your else condition seems to be returning a date data type as the field suggests.
You need to typecast the date to a string using cStr({MembersDetails.DBS Expiry Date}) or cStr({MembersDetails.DBS Expiry Date}, <required date format for e.g MM/dd/yyyy>)
Hope that helps.