Apply advanced formatting
If you can't see the Properties pane mentioned below, on the menu bar click View then click Properties pane. If the pane doesn't appear, you can reset the Report Designer view to its default.
- In Report Designer, click the data field or variable you want format.
- In the Properties pane, click Conditional Formatting then click the finder button.
- In Expression Editor, enter your conditional formatting expression, then click OK.
For information about the syntax used in advanced conditional formatting, please refer to the following section.
Advanced formatting syntax guide
When the Use Advanced Conditional Formatting option is selected, the Conditional Formatting window is replaced by the Expression Editor window. This requires the condition to be entered as an expression in the following format:
if condition to be met, for example, SALES_LEDGER.BALANCE > SALES_LEDGER.CREDIT_LIMIT thenbegin the formatting to apply, for example, TextStyle->Color := NamedColor("Red");endYou can create multiple conditions by using an else statement to separate each individual condition, for example:
if (SALES_LEDGER.BALANCE > 1000 and SALES_LEDGER.BALANCE <= 5000) then begin TextStyle->Color := NamedColor("DarkOrange");endelseif SALES_LEDGER.BALANCE > 5000 thenbegin TextStyle->Color := NamedColor("Red");endThe table below shows some common formatting code examples.
To change | Syntax |
---|
Text Colour | TextStyle->Color := NamedColor("InsertColour"); |
Bold | TextStyle->Bold := True; |
Italic | TextStyle->Italic := True; |
Strikeout | TextStyle->Strikeout := True; |
Underline | TextStyle->Underline := "Double"; |
Overline | TextStyle->Overline := "Double"; |
Style | Formatting := FormattingStyle("Small Heading"); |
Suppress Printing | SuppressPrinting := True; |
Autogrow | AutoGrow := True; |
Wordwrap | WordWrap := False; |
Locked | Locked := True; |
Visible | Visible := False; |
Font | TextStyle->FontName := "Arial"; |
Print On First Copy Only | PrintOnFirstCopyOnly := True; |
Horizontal Alignment | TextStyle->Alignment := "Right"; |
Vertical Alignment | TextStyle->VerticalAlignment := "Bottom"; |