Skip to main content
Answer

VisibleExpr for Date in Report Designer

  • January 19, 2024
  • 2 replies
  • 138 views

Forum|alt.badge.img

We have a report that we want to highlight the last billed date if it is six months or older, but I’m having trouble getting the correct coding to make it happen. 

I know that I’ll have to have two overlapping fields, one visible for the highlighted dates, and one visible for the non-highlighted dates. 

For the highlighted dates, everything I’ve read has lead me to believe that 

=[ContractBillingSchedule.LastDate]>=Today(),'m',-6 should work, but it doesn’t. I’ve tried adding additional parenthesis, apostrophes, etc., but always get the same error:
 

Syntax error in the expression. Context: TextBox 'textBox53' property 'VisibleExpr'

 

Any ideas? I’m sure it’s probably something simple that I’m missing. 

Best answer by Yulia Steinberg

Hi,

Try using DateAdd( date, interval, number ) function:

 

=[ContractBillingSchedule.LastDate] >= DateAdd( Today(), 'm', -6)

2 replies

Forum|alt.badge.img+1

Hi,

Try using DateAdd( date, interval, number ) function:

 

=[ContractBillingSchedule.LastDate] >= DateAdd( Today(), 'm', -6)


Forum|alt.badge.img
  • Author
  • Varsity I
  • January 19, 2024

@yulias18 Thank you, that worked!