JungleDocs | Configuring a grouped view report
Grouped views are useful to present data in a tidy and structured way in SharePoint, so need different Word template configuration. In this tutorial you will learn how to configure grouped view reports.
To export a grouped view while preserving the group structure, you still need a repeated section, but it must be nested inside an additional content control, linking the repeated section to the grouped view. Now let's get started.
- To begin, edit your template and insert the table with two rows.
- Select the table and go to Developer tab. Insert a Rich text content control from the Developer tab in the ribbon.
Note: If you don't see Developer tab in the Word's ribbon, please, do the following: File -> Options -> Customize Ribbon -> on the right side find and check “Developer” -> OK. Read more about adding placeholders in a document template.
- Now click properties and enter the following function in the Tag (required) and Title (optional) fields: GetView("List Name";"View Name"):
Now select the whole second row of the table and add another rich text content control on :
- Click "Properties" and enter the function "GroupItems" in the Tag (required) and Title (optional) fields:
If you need each group of items to have a title, you can add it on the first row of the table (inside the GetView("Companies";"Grouped") content control), by adding another content control with text "GroupTitle" in the Tag field.
Format the table (table style, column amount) and add content controls for all columns from "Grouped" view you want to be included in the report.
Note: It is reccomended to use column's internal names in content control's Tag field.
The final result should be as follows:
Note: The GetView() function ties the repeated section to a specific view in a specific list, so please configure templates accordingly if you need to export different grouped views.