Use JavaScript to Conditionally Alter Layout
Create a report design file.
You can use JavaScript expressions to conditionally alter the layout of your report design. For
example, you might want to change the font color in a particular field, based on
values in the report.
- On theLayoutorMastertab of the main view, select the report item to which you want to apply conditional formatting.
- Open the item'sProperty Editorview and select theHighlightstab.
- ClickAddto create your new formatting rule. The rule has 2 parts: a condition and a format. When the condition is met, Report Designer applies the format.
- InConditionsection of theNew Highlightdialog box, set the condition that you want to test for. In the field on the left, specify the first part of the conditional expression. Clickto enter JavaScript expressions in the Expression Builder.Fx
- In the central drop-down list, select an operator.
- In the field on the right, specify the final part of the conditional expression. Example completed conditional expression:row["OrderTotal"] Greater Than 1000.
- In theFormatsection, specify the formatting that should apply if the condition is met. Example: set the font color to red.