Rectangle

The Rectangle element is used for adding rectangles anywhere to a page or any report section (header, footer, detail). Use the Rectangle element to provide rich formatting to your pages and reports.

Refer to Rectangle layout element for a GitHub example.

Add a Rectangle by selecting it from the context menu and placing it at the desired location.

Figure 1. Select Add Rectangle from the context menu to add a Rectangle layout element.

Figure 2. Setting a Rectangle layout element's fillColor and cornerRadius.

Alternate Colors

One thing you can do with the Rectangle layout element is create a report where every other line is a different color. To make the rows in the report display alternate colors in the background, add a Rectangle in the background and set the showAlternateRow property to either odd or even depending on where to start the behavior.

The showAlternatingColors property only applies to the Detail report section

For example, you might create a report where you place a light blue rectangle in a report's details section.

Be certain to place the Rectangle behind the other fields. You can accomplish this by clicking the Rectangle and selecting Move To Bottom.

Generating the PDF would produce a report where the background color of the data rows alternated.

Properties

The Rectangle element has the following properties.

Property Value Description
borderColor See Colors Users Guide topic. A value indicating the border color of the Rectangle.
borderStyle A value indicating the border style of the Rectangle.
borderWidth numeric A value indicating the border width of the Rectangle.
cornerRadius numeric A value indicating the corner radius of the Rectangle.
fillColor See Colors Users Guide topic. A value indicating the color used to fill the Rectangle.
showAlternateRow Odd, Even A value indicating whether to alternatively display the Rectangle for each record (when the Rectangle is in a Detail section).
id text A value indicating the programmatic identifier of the Rectangle.
angle numeric A value indicating the number of degrees to rotate the Rectangle.
height numeric A value indicating the height of the Rectangle.
width numeric A value indicating the width of the Rectangle.
x numeric A value indicating the X coordinate of the Rectangle.
y numeric A value indicating the Y coordinate of the Rectangle.

In this topic