2019.2

Table Of Contents
Via script (based on a data field value)
To style a table, row or cell based on a data field value, you have to write a script (see "Writing
your own scripts" on page380).
First add an ID or class to the table, row or cell that needs to be styled: select the element (see
"Selecting a table, row or cell" on page307) and add an ID on the Attributes pane. Then
create a script, using that ID or class as the script's selector. The script can be very simple:
if (record.fields.COUNTRY == 'CANADA') {
results.css('color','green');
}
The Designer Scripts API provides several functions to style elements, for example css(),
hasClass() and addClass() (see "Standard Script API" on page803).
Styling an image
Just like many other elements, images can be given borders and rounded corners, and they
can be rotated. How to do this isn't any different from the way it is done with other elements, so
it isn't described in this topic, but in general formatting topics; see "Styling and formatting" on
page286.
This topic discusses specific image formatting issues.
Note that image characteristics like brightness and contrast can not be changed within the
Designer.
Local formatting vs. style sheets
Just as other elements, images can be styled in two ways:
l
With local formatting. This means styling the image directly, using the Formatting dialog.
l
Via Cascading Style Sheets (CSS). In a style sheet, style rules are declared for
elements with different HTML tags, ID's and classes.
See "Styling and formatting" on page286 for background information about these two methods.
Applying local formatting to an image
To apply local formatting to an image, either:
Page 310