Icon

3. Automate PDF report creation with a loop - Solution

Multiple page PDF report

3. Consolidate reports through automation

This workflow generates a dedicated report page for every supplier in the dataset. These pages are consolidated at the loop’s end, followed by the addition of a single global header at the very top of the final document.

Step 1. Create the report template

  1. Add a Report Template Creator node. Keep the default settings.

  2. Add a Group Loop Start node and connect it to the Data Source output. Configure it to group on Supplier name.


Step 2. Enable reporting

  1. Connect the Group Loop Start output to the Plots per supplier component.

  2. Go inside the Plots per supplier component and click Open layout editor.

  3. Tick the Enable reporting checkbox in the bottom left corner to enable reporting.

  4. Repeat the previous two steps for the Header component.

  5. Connect the output port of the Report Template Creator node to the input ports of both components.


Step 3. Report for each supplier

  1. Insert a Report Loop End node and connect the Plots per supplier component output to its input port.

  2. Open the configuration and check the Insert page break between reports option, to that plots of each supplier is on a separate page.


Step 4. Add a header to the report

  1. Use a Report Concatenate node to add a header to the report.

  2. Connect the output of the Header component to the top port, the output of the Report Loop End to the bottom port.

  3. Leave the Insert page break between reports option in the configuration unchecked.


Step 5. Write the PDF report

  1. Add a Report PDF Writer node.

  2. Configure the path where the PDF file should be written to as URL: knime://knime.workflow/../report.pdf


Step 6. Upload and schedule

  1. Upload the workflow to one of your KNIME Hub spaces.

  2. Create a version of the workflow.

  3. Create a schedule deployment of the workflow.


Group Loop Start
Report Template Creator
Report Concatenate
Data Source
Report Loop End
Header
Report PDF Writer
Plots per supplier

Nodes

Extensions

  • No modules found

Links