Icon

Multipage PDF Report from Different Sources into Google Drive

There has been no title set for this workflow's metadata.

You can easily download and run the workflow within your KNIME installation. For optimal performance, we recommend using the latest version of the KNIME Analytics Platform.

This workflow demonstrates how to use new Reporting nodes. The workflow outputs the same report structure into different pages with dynamic titles and labels.

When do you need to perform this kind of task? In this example, we have socio-economic data for various countries, and we aim to create a report for each country consisting of a pie chart, a bar chart, and a table view with relevant information. We organise the first page based on the data for the first country, and then the workflow automatically generates all the necessary pages for each country.

First, we import into the workflow data area data from "ILOSTAT", the International Labour Organization's web portal. We use three CSV Reader nodes, one for each report type's unique data structure. At the top branch, we create a table with the names of five countries from which we want to extract information. We connect this table to a "Table Row to Variable Loop Start" for iteration over all five countries.

We compose our page for the first country in the "European Countries Statistics" component. To edit your page layout, right-click on the component and choose "Open layout editor": You can arrange the items for your report page. Make sure to select "Enable Reporting"!

After you have enabled the "Enable Reporting" option, a blue input and output port will appear in the component. Connect the "Report Template Creator" node to the newly created input port and define the page size and orientation in the "Report Template Creator" dialogue to generate the report.

Here are some helpful tips for using the layout editor:

1. There is no need to add lateral padding as it will be added automatically by the Report PDF Writer node.

2.The "Text View" node helps create page headers, divide elements, and add tooltips or comments to charts. We have used a flow variable to change each page's title dynamically.

To merge all created page reports in the loop iterations, connect the output port of the component to the "Report Loop End." The preview will display five pages that are ready to be shared. To create a PDF of the report, utilise "Report PDF Writer."

We write the PDF report into a temporary folder in the workflow data area. Finally, we send the temporary local path to the "List Files/Folders" node and use the "Transfer Files (Table)" node to move the PDF Report to the chosen directory in Google Drive.

URL: Working-age population by sex and age (thousands) -- Annual - ILOSTAT https://ilostat.ilo.org/topics/population-and-labour-force/#
URL: Average monthly earnings of employees by sex and economic activity -- Annual - ILOSTAT https://ilostat.ilo.org/topics/wages/
URL: Employment by sex and weekly hours actually worked (thousands) -- Annual - ILOSTAT https://ilostat.ilo.org/topics/working-time/#
URL: KNIME Collection: First Steps with KNIME Reporting https://hub.knime.com/knime/collections/First%20Steps%20with%20KNIME%20Reporting~BmSxAYmlmIJtTh7i

Nodes

Extensions

Links