Skip to main content
Reporting with Application Automation

ON THIS PAGE

Reporting with Application Automation

The native Qlik Reporting connector blocks let you quickly and easily build customized, multi-page reports based on app sheets. This tutorial shows you how to use each of the reporting blocks to build reports. By the end of this tutorial, you'll be able to generate single-page reports based on an app sheet, generate multi-page reports, and generate customized reports with different selections applied to different sheets.

Qlik Sense Enterprise SaaS Government note

Qlik Sense Enterprise SaaS - Government (US) does not support the Qlik Reporting Service and Qlik Application Automation to deliver customized automated reports.

Security

Once a report is created using an automation, you can share the PDF document with anyone. This means you could potentially share data from an app that is not available to all users. Before creating and sending reports, make sure you understand the security implications of the app and data used to create the report.

To see more information about limitations, features, and use cases for reporting, see Multi-sheet PDF reports via Qlik Application Automation.

Generate a report

By the end of this section, you'll be able to produce a simple report showing the sheets from an app. You generate the report manually by executing the automation. If you are using an app with more than one sheet, all sheets are included in the report. In later sections, you'll learn how to select specific sheets to customize the report.

  1. Create a new automation.

  2. From the block selector pane, under My Connectors, select Qlik Reporting.

  3. Drag a Create Report block onto the canvas and attach it to the Start block.

  4. Select the App ID field and use the do lookup function to find the app you want to use to generate a report.

    The Name field is populated with the app name. If you want the report to have a different name, enter a new name into this field.

  5. Set the Sheets mode to All.

    This setting creates a report that includes every sheet in the app.

  6. Drag a Generate Report block onto the canvas and attach it to the Create Report block.

  7. The Report field will be filled in with the report name from the previous block.

  8. From the block selector pane, under My Connectors, select Mail.

  9. Drag a Send Mail block onto the canvas and attach it to the end of the automation.

    The Send Mail must be configured to send email. Select the Connection tab on the block configuration menu. Enter the relevant mail connection information for your email provider. For an example on how to connect using a Gmail SMTP server, see Gmail authentication.

  10. Select Inputs.

  11. Enter an email address in the To field.

  12. Enter an email Subject and set the Type to Text.

  13. Enter a message in the Body field.

  14. Select Add Attachment.

    In the File field, select the report name from the drop-down menu.

    Your report automation should look like this:

    A simple automation for reporting with 4 blocks

  15. Save the automation, then click Run.

    If you receive no block errors, the report is sent to your destination email address. The most common error when using a Mail block is an SMTP configuration error. If this happens, check the connection settings for the Send Mail block and try again.

Add a selection to the report

In the section above, you created a report based on the sheets in an app. In this section, you'll apply a selection to the entire report. If your app has multiple sheets, all sheets are included and the selection is applied across all sheets.

  1. Drag an Add Selection To Report block onto the canvas and attach it below the Create Report block.

  2. In the Report field, make sure the report name appears. If not, use the drop-down menu to select it.

  3. Select the Field name field and use the do lookup function to find a field for your selection.

    The field name file for the add selection to report block

  4. Below the Values section, click Add value, then use the do lookup function to select a value to use for your selection. The values shown are those linked to the field you selected.

    alt

    Tip note

    If your app has alternate states, you can use the do lookup function in the State field to apply an alternate state selection to the report.

  5. Once your Add Selections To Report block is configured, save the automation.

  6. Click Run to send the report with selections applied to the report.

Customize the report

In the section above, you applied a selection to the entire report. A common reporting use case is to build a report containing selections applied to the sheet rather than the entire report. This lets you customize each page to meet your business use case. In this example, you'll add the same sheet twice but apply different selections. This creates a report that can be used to compare the same chart for different field values. The same steps apply when you want to add different sheets to your report.

  1. Working with the same automation you created above, drag all of the blocks below the Create Report block to one side of the canvas.

  2. In the Create Report block, change the sheet mode to Custom.

  3. Add two Add Sheet To Report and two Add Selection To Report blocks to the canvas.

  4. Attach them below the Create Report block so that the sequence is to add a sheet, make a sheet select, add another sheet, make another sheet selection. Your automation should look like this:

    The start of an automation to add sheet selections to a report

    Information note

    The Add Selection To Sheet block applies a selection to a sheet that is added with a Add Sheet To Report block. This means that for every sheet, you must add a unique block to apply selections. If you don't, then no selections are applied.

  5. In this example, you want to add the same sheet twice. For each Add Sheet To Report block, use the do lookup function to select the same sheet from the app for both blocks. The Report field is automatically filled in with the report name.

  6. For each Add Selection To Sheet block, add different field values to each sheet. The selections apply to the Add Sheet To Report block that precedes it.

  7. Re-add the Generate Report block and Send Mail block to the end of the automation. There is no need to reconfigure these two blocks.

  8. Save the automation and click Run. You'll receive a two-page report of the same sheet with different selections applied to each page.

Next steps

In this tutorial, you triggered the report manually from the automation editor. In most cases, you'll want to set up the report on a schedule, or to trigger the report through a webhook or in-app trigger. Create a custom report using the examples from above, then follow one of the topics below to change how the report is triggered.

  • To learn about the different ways you can trigger an automation, see working with run modes.
  • For an example on how to trigger automations from a button in your app, see the active intelligence tutorial.
  • To learn how webhook triggers work, like to execute an automation when an app is reloaded, see working with webhooks.