Nested grids are used when you need to display hierarchical data, such as customers and their respective applications. The main Grid encapsulates other Grids, showing in each of its Nested grids additional data records. Note the image below in which for each customer is displayed a sub-query with the applications.
Customer Grid with an order nested grid.
In the application menu, by clicking on the item folder Configuration Nested grids, can be changed the General attributes of the Nested grids.
Nested grid menu.
Nested grid general settings.
- Title in the same line : This attribute enables you to configure the Nested Grid title display. If it is displayed on the same line, Nested Grid table will be incorporated into the main Grid.
Example using Nested Grid title on the same line.
- PDF : This option allows you to enable/disable the nested grid display in PDF reports.
- Enable TreeView : This option enables an option to hide/display the Nested Grid within the main Grid records. By choosing “Yes”, the option “Title in the same line” will be automatically disabled.
Using tree view in the Nested Grid.
- Position : This option allows you to configure the Nested Grid placement in the main Grid. This option is not available if you enable “Title in the same line”. You will be able to position the Nested Grid within the records. The options are:
- In one column
Displaying the Nested Grid in the same row of the main Grid record.
- Below the record
Displaying the Nested Grid in a separate row of the main Grid record.
- Alignment : Allows you to set the Nested Grid alignment in the main Grid interface when “Position” is set set as Below the record. The options are: left, right and Center.
Any of the attributes that use the value “Set individually” requires the property to be configured on each created link settings.
To create a Nested Grid link click on the “New link” within the Link folder.
Creating a new Nested Grid
- Adding a new Nested Grid : Enter the name and the label for the link that will be created.
Adding a new Nested Grid
- Application list : All Grid applications from current project, that contain global variables, will be listed.
Grid application selection.
- For an application to be used as a Nested Grid, it must have within its SQL command (Grid > SQL) a WHERE clause with a global variable to receive the parameters from the main Grid.
SQL query configuration to the Grid be used as Nested Grid.
- Parameters setting : Setting the value that will be passed to the variable(s) of the Nested Grid SQL statement.
Informing the parameter to the variable
In the screen above, on the left side, it is displayed the Nested Grid input parameters (global variables created within the Nested Grid WHERE clause), on the right side, you must select the parameter option. The options are:
- Field : Used to assign a Grid field value as a parameter.
- Fix : Used to assign a fixed value as a parameter.
- Empty : Choosing this option will not be assigned any value as a parameter.
- Save button : By clicking this button the Nested Grid creation will be completed and saved.
Editing an existing Nested Grid link
All Nested Grid links created will placed within its menu options, inside the folder “Links”. By clicking on the Nested Grid name there will be an interface for settings editing.
Editing a Nested Grid
Nested Grid general settings
This interface can be used to edit the following Nested Grid attributes:
- Label : Nested Grid title for the application
- Link : In this attribute are displayed the current Nested Grid connection data, showing the application and parameters used. To change any link attribute just click to edit Link.
- Display : This attribute allows you to set which Nested Grid items, if it uses any of these resources, will be displayed in the main Grid.
* __1__ : Display Title. * __2__ : Sequential display (number line). * __3__ : Display Totals.
- Inherit view : When marked it sets that the Nested Grid view will be equal to that of the main Grid.
If the value of one of the attributes in the Nested Grid settings has been selected as “Set Individually”, these values must be configured in the Nested Grid editing screen for each called link.
Nested Grid settings.
These options will only appear if all of the following conditions are true:
|Title in the same line||No|
|Enable Tree view||No|
|Position||In one column|
Nested Grid display settings
- Horizontal Alignment : This option sets the Nested Grid horizontal alignment. It can be aligned left, right or Center.
- Vertical Alignment : This option sets the Nested Grid vertical alignment. It can be aligned to the top, middle, or End.
- Background color : Here you can set the background color. If it is not filled it will get the Grid default background color.
- Title horizontal alignment : This option sets the Nested Grid label horizontal alignment. It can be aligned Left, Right or Center.
- Title vertical alignment : This option sets the Nested Grid label vertical alignment. It can be aligned to the top, middle, or End.
- Bold : This option sets the Nested Grid title (label) in bold.