GRW – Expression editor syntax

by Support Team

We had a support call recently where a user was having trouble coming up with the correct syntax in the Expression Editor in Genero Report Writer

They had a color property set to an expression such as


and were trying to use a similar expression in the bold and italic properties.  They were trying syntax such as


which is incorrect.

The key thing to note with the expression editor is to understand what type of value is expected.   Any color property is expecting a value of type color .  The color type being

The Bold or Italic properties are expecting a boolean  The boolean type being defined

So when entering a value in the expression editor, note what type is expected in the property documentation and ensure that your expression returns a value of that type.  In this case the correct syntax depending how verbose you wanted the expression to be was one of...