..2 Form
Of course, you could create the form "from scratch".
However, it will be faster to slightly modified the Form from the previous example. Here we explain this method.
Open the previous Form and save it by another name
Open (in the XLSX Workbench) the form EMPLOYEELIST (from previous example) and save it by another name EMPLOYEELIST_2.
Modify the template binding for «Pattern»
Modify the template binding for the component
according to scheme below :
Create a new component «Folder» and include the «Pattern» into it
For just created "folder", in the item «Group» of the Properties tab, You have to switch on the option for the rows grouping (set the flag).
Move the component
on the just created component
(via 'drag-and-drop' technique) to include the «Pattern» into the «Folder» :
Create another component «Pattern» that describes the top level of list
Create new components «Pattern» and «Value» .
under the «Loop»:
Perform Template binding for a «Pattern» according to scheme below:
Perform Template binding for «Value» according to scheme below:
to corresponding field of the Context .
Set workbook properties of Excel-template
In order to define location of the Summary rows BELOW detail rows, follow to Excel menu: Data > Outline and uncheck a corresponding checkbox in the popup-window:
Activate the Form by pressing a button
Form is ready to use.
Explanations
There are two levels in the list: Top level («non-collapsible» record) and Low level («collapsible» records).
We have created «Pattern», that describes the Top-level record of the list:
To make Low-level records «collapsible», we have included it into the Folder component with «Group» option: