Running Post Processing Flow On Report Output

Last Updated: 07/15/2016 Introduced in Verision: 3.2

This tutorial demonstrates how to create and use Report Post Processing Flow. This Flow type is used as a Report Output Handler. With this Flow configured, users will get a new option of saving Report into Excel file. In other words, this Flow takes in Report Data and with Steps in the Flow it organizes this Report Data into Excel File. Then, it outputs this custom Excel File. As an example, this kind of Flow may be used in the similar manner as Report Output Template.

 

Example:

In this example we will create a simple Report. Then, we will create a Report Post Processing Flow that will be arranging Report data into Excel File. Finally, we will use this Flow to save our Report as an Excel file.

We begin in the Designer Folder with clicking Create Report/Page > Create Report option from Folder Actions Panel.

createReport

In the resulting window we Name our Report and click Create to proceed to the Report Designer.

nameReport

In the Report Designer we add Account Data Source from Data Sources > Common category.

addDataSource

Next, from the Account Data Source we add desirable columns to populate our Report with data.

addColumns

This completes our Report for this example. We can save Report and close Report Designer.

Next, in the Portal we navigate to the System > Designers > Report Output > Handlers folder and click Add Report Output Flow button on the Folder Actions Panel.

addReportOutputFlow

Then, we Name our Output Handler and click Create to proceed to the Flow Designer.

nameReportHandler

In the Flow Designer we add Create Data step from the Favorite Steps category.

addCreateData

In the resulting Data Definitions window we click Add New link. Then, in Add Data Definitions window we name our data “File” and define its Type FileData. Click Ok to save and continue.

defineFile

When our FileData is defined we can click Add to continue.

fileDefined

Then, we select this Create Data on the workspace and Step Information window pops up. We locate Inputs section for the File and select Constant Mapping type. Next, we are going to pick an Excel file from our computer using Path picker.

pickFile

The Excel file that we are going to pick will serve as a Template for our Report data…

excelFile

After we picked the Excel File we can click Add Step.

addStep

Next, we need to order Report data into the Excel Template using Excel steps in the Flow. We add Set Values In Column step from the All Steps [Catalog] > Data > List > Excel and CSV category.

addSetValsInColumnStep

Next, we select this Set Values In Column step on the workspace. In the Step Information layer we click Show Mapping Editor.

showMappingForFirstSetValues

In the Mapping Editor we map data as following…

This step will populate Excel file with data in the first column. For column field we define ‘1’.  Define fileType corresponding to the type of our Excel file. For the input field we map our Excel file from the Create Data step. For the row field we define value ‘7’ because first 6 rows in our Excel file contain some data. Finally, for values field we use TextValue collection from ReportData > AllData > Field01. When finished, we can save and close Mapping Editor.

mappingForFirstSetValuesDone

Next, we add another Set Values In Column step from the All Steps [Catalog] > Data > List > Excel and CSV category.

addSecondSetValues

Then, we select this step on the workspace and click Show Mapping Editor in the Step Information layer.

showMappingForSecondSetValues

In the Mapping Editor we map data in the similar way that we did for the first Set Values In Column step but this time we define column value ‘2’ and for the values field we use TextValue collection from ReportData > AllData > Field02. Then, we save and close Mapping Editor.

mappingForSecondSetVals

After Steps in the Flow do the work and populate Excel file with data from the Report, we need to update Excel File. We add Update File With Data step from the All Steps [Catalog] > Data > List > Excel and CSV category.

addUpdateData

Then, we select Update File With Data step on the workspace and in the Step Information layer locate Inputs configurations. We define fileType and for the input field we use Select Value Mapping type and pick our File data from the Flow.

dataMappingForUpdate

Next, we connect Update File With Data step to the End Step in the Flow. Select End Step and map our updated File to the Output.

mapDataToTheEndStep

This completes our Flow. We can save it and close Flow Designer.

flowCompleted

Then, we locate the Report that we have created at the beginning of this tutorial and Run it.

runReport

When Report is running we click Print Report from Report Actions.

printReport

In the resulting Print window we select our Report Handler Flow from the Output Type dropdown.

pickProcessingFlow

Then, click Download.

downloadReport

Portal prepares Print Preview and we can click Download link…

clickDownloadLink

Then, Decisions informs us that the File was saved. We click Ok

fileSaved

Next, we locate our Excel File that we just downloaded and it should look like on the following figure…

excelReportSaved

 

 

 

 

Additional Resources