Example | Creating a report from multiple lists
In this example case, you will learn how to create a quick report of selected company's contacts with JungleDocs for Office 365. You will do this by automatically exporting SharePoint list item metadata into a Word Document.
Before you begin
Before you get started with this tutorial, here are some JungleDocs for Office 365 basics that will give you a deeper understanding of the tool and some additional customization ideas for the tutorial below:
- How to configure document templates
- What content controls are and how to use them
- How to create and use Report rules
- How to use formulas
What we want to achieve
In this example case, we want to get an overview of our client companies and the individual contacts we have for each of them. We have the companies and clients stored in two separate lists.
Firstly, we want to export the below list to Word.
Secondly, we want to export the contacts from the list below, in such a way that they will appear under the correct company.
Once we have achieved this, we will have a good overview of companies and their employees.
Step 1 - Create a Report rule
To start we will have to create a Report rule:
- From the Companies list, we open JungleDocs 365 from the ribbon.
- Check if you are on the Reports tab and click New rule.
- Name your rule and choose what you want to happen after you run the rule (document gets downloaded or is saved to a SharePoint library).
- To help you with the template creation (see Step 2) click Generate sample document. This command will create a document with content controls that you can drag into your template.
- You can now save the Report rule. We will come back to it after creating the template.
2 - Create a document template
1. Insert static content
Now we will create a template for our company report. First, we insert static content. Static content is content that is always there and does not change. For the static content in this template, we will just add our logo to the header.
2. Insert content controls
We will now insert content controls to let JungleDocs 365 know what spaces should be filled with metadata from the Office 365 environment.
1. With the document opened, go to the Developer tab and insert a Rich Text content control.
2. Once you have inserted the content control, click properties and enter the ReportItems formula in both the Title and Tag fields. Adding some enters to the content control will give you more space to work for the next couple of steps.
3. Next, you will add the content controls within the ReportItems field for all of the column data you want to be exported to the Word file. You can do this simply by dragging and dropping the content controls from the Sample Document you created during step 1.
5. After you have dragged the content controls from the Sample Document into the ReportItems field in the new template, your template will look like this:
6. Now you can add a table below the existing content controls. This table will be populated with the contact details. Once you have created the table and decided in which column you want what data to appear, you select the entire bottom row and insert a GetView content control to gather data from the Contacts list.
7. The GetView formula, in this case, looks like this:
8. Once you have finished editing your template you can save it and move on to the next step.
3 - Create JungleDocs Report rule
Now go to the document library where you want your documents to be stored and open JungleDocs 365 from the ribbon.
1. Navigate to the Reports tab in JungleDocs 365.
2. To add a Report rule click New rule.
3. A new window will now open, prompting you to configure the new Report rule.
4. Select the template you created for this rule.
Note: it is our recommendation to store all your templates in a separate template library on your SharePoint Online environment. This will make it easier to manage your templates and you can be sure they won't be deleted by accident if a certain project gets deleted.
5. Once you have configured your new Report rule, click Save to save it. You are now done and can select the new rule from the Reports tab in JungleDocs for Office 365.