JungleDocs | Creating grouped view reports
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.
Before you proceed, you might want to learn more about:
- creating a grouped view in SharePoint
- editing document templates
- adding content controls in a document template.
To export a grouped view while preserving the group structure, you need to create a repeated section inside another content control. This structure will link the repeated section to the grouped view. Take the following steps to configure the report template correctly.
Note: this walkthrough was made under the assumption that you have created a grouped view in your SharePoint list already.
1. Open your document template and insert the table with two rows.
2. Select the table, then go to the Developer tab and click on Rich text content control button. If you don't see the Developer tab in the Word ribbon, click File -> Options -> Customize Ribbon and check Developer box and click OK.
3. Now click Properties and enter the following formula in the Tag (required) and Title (optional) fields:
GetView("List Name";"View Name"). 4. Select the whole second row of the table and add another rich text content control on it.
5. Click Properties and enter the function
GroupItems in the Tag (required) and Title (optional) fields.
6. 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.
7. 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 recommended to use column internal names in the content control Tag field.
The final result:
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.