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 aims to demonstrate the features of the Reporting nodes. Specifically, we aim to create three dashboards, paginate them, and generate a PDF report for emailing.
We used Google Analytics to download anonymous data from our website and created three CSV files in the workflow data area.
We have organised our report pages by encapsulating different views and text in each 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".
Here are some helpful tips for using the layout editor:
- There is no need to add lateral padding as it will be added automatically by the Report PDF Writer node.
- The "Text View " node helps create page headers, divide elements, and add tooltips or comments to charts.
- The "Table view" node now supports HTML. Use the Column Expression node to create links or add color to cells. Check out the "Events" component in this example to see how.
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.
To combine the report, begin by connecting all output ports of the components to "Report Concatenate." The preview will display three pages that are ready to be shared. To create a PDF of the report, utilise "Report PDF Writer."
We write the report to a temporary folder in the workflow data area and pass the path as a flow variable. Later, we use this path to attach the PDF to our email in the "Email Sender (Labs)" node.
After obtaining our PDF file, we must configure the "Email Connector (Labs)" and "Email Sender (Labs)" nodes. In this example, we configured the node to send an email from a Gmail account, open the configuration window of the "Email Connector (Labs)" node and set up the node:
The Mail Host (SMTP) tab has already been set up for you. Your only task is to generate an application password for your Gmail account. To do so, please refer to the "Sign in with app passwords (GMAIL) - Docs" link in the External resources section. This link will provide you with detailed instructions on how to generate the application password. Once you have created the application password, be sure to use it as the node's password.
In the "Email Sender (Labs)" node specify the recipients, the subject and body or your email. And specify the local path of the PDF to attach (in our case a temp folder) within the field Attachments (Input Column).