JungleDocs | Assembling reports with Small Parts
Creating company reports can be a lot of work, especially if you have to do several at once. With JungleDocs you can configure a template to agregate all needed information from different SharePoint places into one document or report. But in some cases, you don't need all that information, but just some parts. In this case, we suggest you use Small Parts. You will then divide your template into a few small documents. Using JungleDocs Small Parts feature, you will always be able to decide which parts to include into a document.
In this tutorial, you will learn how to do create a report from multiple parts. For your convenience, it is divided into 4 easy to follow steps.
- Add documents to your Small Parts library
- Configure your report template to include Small Parts
- Configure a JungleDocs rule to use Small Parts
- Generate a report using Small Parts
To begin, we will see how you can add the documents that you want to be shown in your future company reports to your Smart Parts library. Then we will cover the configuration of the JungleDocs base rule and the company report template so that it includes the Small Parts. And finally, we will create a company report using the now configured JungleDocs rule.
1. Add documents to your Small Parts library
1. Go to your Small Parts library, or create one if you do not have one yet.
2. Add a folder to your Small Parts library, and name it accordingly. in our case, we added two folders: "Company" and "Charts".
Note: There are no specific requirements for the library, but we strongly advise distributing your smaller documents across folders in the library. You can choose what folders to include in the document template configuration, so when you run JungleDocs, unnecessary folders will not be shown.
3. Add the files you want to be included into your future Company Reports to the folders you just created.
In this example we added Contacts, Quotations and Proposals files into the "Company" folder. Chart Invoices we placed in the "Charts" folder.
Now, let's see now how Small Part templates are configured.
Small Parts configuration
A "Contacts" Small Part document template contains a table of two rows. In the second row we have used a rich text content control with the function GetView("ListName"; "ViewName"). Inside there are additional placeholders for particular lists columns (in our case it is Contacts list) which we want to see in this report: First Name, Last Name, Mobile Number and E-mail. We used the Contacts list's column internal names to configure those placeholders. You can configure charts in your report as well.
1. As we want to get contacts for a selected company, we should configure a dynamic view to use in our GetView() function. In the Contacts list you will need to create a view (in this example it is named "Filtered"). Check the columns you will need in your report:
2. Create a filter for your dynamic company name. The value in a Company Column (Company column in Contacts list) should be equal to the Company Column in the Library where your created Reports will be saved.
2. Configure your Company Report template to include Small Parts
Now we can create the general template for our Company Report.
1. Go to the library in which you save your document templates and create a new Word document from the ribbon.
2. When you have your new Word document opened, you can start editing your template.
3. Insert the Small Parts relevant to the final document using Small Part content controls. You can copy content controls using "Generate sample document" link in JungleDocs edit rule settings. Or you could insert them manually, using rich text content controls with the tag Small Part: Folder Name:
3. Configure a JungleDocs rule
Now you will need to configure the JungleDocs rule to include the Small Parts you just added to your library, into your future company reports.
There are two ways for doing this.
If you want your reports to be created in a particular library with automatic naming, then create a library for such reports or use an existing one.
In the library for Company reports, you need an additional Column for the Company name. In our example, it is lookup column "Company" to companies list.
You can create content types for different types of reports and set a base document template in your content type settings. In that case, JungleDocs automatically shows all Base rules based on content types. Now you will just need to edit the rule settings to provide a Small Parts location and file naming formulas.
Or you can have just one general content type (for example Report). In this case, you can create and configure several Base rules in the JungleDocs New tab. You can base them on the same content type, but each using a custom template. In the latter case, you should, under the Document template header, choose Custom template and press Manage custom template to provide a template URL location to upload your template file.
At the end, the Base rule settings will look like the image below:
Now you can start creating your reports directly from that library. Simply choose JungleDocs in the Ribbon and execute "2. Company Report" rule. Select the Small Parts you want to include in your report and press OK when you are finished.
Choose a Company name in the metadata properties and press save.
Your company report will now be generated for the selected company.
Your second option is to start from the companies list itself. In that case, you will need to configure a new "From existing" rule. To do this, select a company item and launch JungleDocs from the Ribbon.
Note: if you want to save generated reports in the Reports library you created before, browse that location and choose the base rule configured above. The base rules settings, like your file naming, will then be copied.
In this menu, you can also edit your template, upload a custom template and generate a sample document.
In the JungleDocs base rule settings menu browse for the Small Parts library you want JungleDocs to search when generating your Company Reports.
You are now ready to easily create Company Reports!
4. Generate a Company Report
1. Open your Company list and select a company
2. Choose JungleDocs in the Ribbon;
3. In the From existing tab click Company Report, this option is already set up and is ready to use;
4. Select the Small Parts you want to include in your report and press OK when you are finished.
5. Your company report will now be generated.