You can use a Page List or Page Group property as the data source in a grid layout. As of V6.1 SP2, you can also use a report definition rule. The grid dynamically generates as many rows as needed to display the report definition results, which are in read-only format. The grid layout:
- Is cross-browser compatible
- Can display a custom skin
- Is localizable
This article describes how you set up a grid layout using a report definition as the data source.
There are two ways to set up the grid:
- Add a layout to a section and specify the report definition rule.
- Drag and drop a report definition rule from the Application Explorer onto a section. This creates a grid layout with the data source already defined.
This article describes both methods.
Create a grid in a section
Do the following:
- In the section, drag a layout from the Layout group and drop it onto the work area.
The Set Layout Type dialog appears.
- Select the Repeating radio button and
Grid from the drop-down list. Click OK.
The Grid layout appears in the section. The data source is undefined.
- To add the data source and define other properties in the grid, display the wireframe and select the magnifying glass icon () next to the Repeat Grid header. This opens the Repeat Grid properties panel.
- In the panel, select
Report Definition in the Source drop-down list, enter the class in which the report definition belongs in the Applies To field, and enter the report definition rule in the Report Definition field. Note that the Edit Mode value is
Read Only and the Reordering checkbox is disabled. You cannot change these settings.
The Sorting checkbox is selected by default, which enables the user to sort on any column in the report (except for columns containing work object IDs). The user can alternate the sort order (ascending/descending) by clicking the sort icon in the column header. You can disable sorting for individual columns by clearing the Enable Sorting checkbox in a column's Cell Properties panel.
Select the Row Numbers checkbox if you want to sequentially number the rows in the report results (numbers appear in the row selection column).
Select the Open on double-click checkbox if you want the user to double-click on a row to display its details.
- Click OK in the Repeat Grid panel. The report definition rule name and the Applies To class populate the Repeat Grid header.
Add a report definition from the Application Explorer
Do the following:
- Select or create a section to hold the layout.
- From the Application Explorer, select the report definition rule and drag it to the work area in the section.
The grid appears. You do not need to specify the report definition as the grid's data source — this happens automatically. The report definition name and Applies To class appear in the Repeat Grid wireframe header.
- If necessary, open the Repeat Grid properties panel to edit its fields as described in step 4 above.
Add row properties
After creating the grid, populate the repeating row's property values as follows:
- Select a cell from the second row in the repeating area and open its Cell Properties panel.
- In the Property field, type a period and display the list of properties in SmartPrompt. The list only contains Column Name properties defined in the rule. If there are joins in the report, the joined property names appear as
joinname.PropertyName. In the example below, these properties use the
- Optionally, enter a read-only control rule in the Control field to configure the presentation of a property value. For example, use .pxCurrency to add a currency symbol or display a scaling factor to an integer value. You cannot use express action buttons or edit-mode controls such as text input boxes, text areas, or checkboxes in a repeating grid that uses a report definition.
- Repeat steps 2 and 3 for each property you want to include in the report results.
- Save the section when you complete your edits.
Using the pagination feature
When you create a grid using a report definition, a pagination gadget labeled 1,2... displays in the top action area if paging is enabled in the report definition rule (the Enable Paging checkbox is selected in the Paging section on the User Interactions tab).
You can drag and drop the gadget onto any cell in an action area or onto a header cell in the repeating grid.
The pagination gadget displays the data results in segments — known as pages — each containing a fixed number of rows. The system retrieves a segment from the total data set on the clipboard and presents the page navigation controls in a format defined in this option.
To remove paging or change the format, select the magnifying glass icon ( ) next to the Grid Repeat Layout header in the wireframe. In the Grid Repeat Layout properties panel, open the drop-down list in thePaging field.
The options are:
None — No pagination. By default, this is selected if paging is not enabled in the report definition rule.
Page 1 of X — Presents an editable page number and a total page count. To navigate, users edit the number and press Enter, or use the navigation buttons.
Page 1,2,3... — By default, this is selected if paging is enabled in the report definition rule. Presents the first group of N links as page 1, the second group as page 2, and so on, where N is the total number of rows divided by the value of the Rows per Page field. For example, if the Rows per Page value is 20 and the report contains 207 rows, the first page contains rows 1 to 20, and the last (11th) page contains the final 7 rows. To navigate, users click a number to open a page ( 1, 2, ...) within the range. The display is limited to 10 pages. If there are more than 10 pages, users can click (... ) to advance to the next group.
Rows 1 - Y — Presents a range of rows (defined in the the Rows per Page field) in a drop-down list. To navigate, users select a range in the drop-down list or use the navigation buttons
First X Results — Presents the data in either of two page views. The first view is a subset of the data on the clipboard and comprises the top rows defined by the Rows per Page setting. For example, if the setting is 50 and there are 200 rows on the clipboard, a label at the top of the list reads "Showing 50 of 200." To view the entire data set (200 in this example), the user clicks the Show All link. This enables a user to drag rows at the top of the set and drop them onto the bottom. The other paging options break large data sets into individual pages and do not have this capability. The user can click the link to toggle between the first and total views.
In the Rows per Page field (which appears when you select a Paging option other than
None) select the row limit per page. The default value is set in the report definition rule (the Page Size field in the Paging section on the User Interactions tab). To specify a custom value, select
Other and enter a positive integer in the empty field.
Note: Your grid pagination updates are not affected by subsequent changes to the report definition rule's Paging settings.