2019.1

Table Of Contents
First set an ID on the detail table as a whole and create a script that uses thatID tbody as the
script's selector. If for example the ID is table_1, the selector will be: #table_1 tbody. Then
write a script like the following:
for(var i = 0; i < record.tables.detail.length; i++){
if(record.tables.detail[i].fields['Shipped'] == 1)
query("tr:nth-child(" + (i+1) + ")", results).css
('color','green');
}
This script loops over a detail table, evaluating the field Shipped. If the value of that field is 1, it
looks up the corresponding row in the results (the object that contains the selected detail
table) and colors the text of that row green. (See also: "query()" on page1278 and "Examples"
on page1240.)
To keep all CSS style rules together you could add the style rules to a class in the CSS file
(see "Styling templates with CSS files" on page718) and assign that class to the a row or cell
using addClass (see "Examples" on page1229).
For another example, see this how-to: Change detail line formatting based upon a data field
value.
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
page717.
This topic discusses specific image formatting issues.
Note that image characteristics like brightness and contrast can not be changed within the
Designer.
Page 742