Icon

04.2 Multi-Page Report - Solution

<p><strong>Learning objective: </strong>In this exercise you will generate a multi-page report using a loop. Inside the report, you will customize the header for each page using a flow variable.</p><p><strong>Workflow description:</strong></p><p>The same customer transaction data set from the demo is used in this exercise.</p><ol><li><p>The <strong>Excel Reader</strong> node reads the customer transaction data.</p></li><li><p>The date column is processed by the <strong>Date&amp;Time Processing</strong> metanode. This metanode retains the transactions on or later than 1-1-2019, and appends two columns: <strong><em>Year </em></strong>and <strong><em>Quarter</em></strong>.</p></li><li><p>The quarterly total sale is generated by the <strong>Pivot</strong> node, with <strong><em>Year</em></strong> and <strong><em>Quarter</em></strong> as rows and the classes of <strong><em>StoreType</em></strong> as columns. The aggregation method is the sum of <strong><em>Price</em></strong>.</p></li><li><p>Any missing values are replaced with zeros with the Missing Value node.</p></li><li><p>A new column <strong><em>QuarterAndYear</em></strong> is created by joining <strong><em>Year</em></strong> and <strong><em>Quarter</em></strong> by the <strong><em>Expression</em></strong> node.</p></li><li><p>The pivot columns are renamed as <strong><em>Online Store </em></strong>and <strong><em>Onsite Store</em></strong> by the <strong>Column Renamer</strong> node.</p></li><li><p>The <strong>Quarterly Sale Trend</strong> component plots the quarterly sale data in a stacked area chart, and produces a report. Open the component for more details. The <strong>Report Template Creator</strong> node is connected to the bottom input port of this component, propagating the orientation and the size of the report.</p></li><li><p>The generated report is saved to a PDF file by the <strong>Report PDF Writer</strong> node.</p></li></ol>

Nodes

Extensions

Links