Automate Exporting and Emailing Power BI Reports with KingswaySoft

29 April 2024
KingswaySoft Support

A report in Power BI is a great way to get a quick and detailed snapshot of your data sources. Within Power BI, you can easily export these report types by setting up a process that would send an email with a link to the report. However, you may run into issues if you try to send it to users who don't have a license or the privileges to view the report. This also applies to situations where you send a report to an external party.

In this blog post, we will discuss how KingswaySoft components can be used to overcome this restriction. Essentially, you can export the report in a supported offline format (such as a .pdf file) and send it to any email address required within a single data flow. Another benefit is that you can dynamically set how frequently to send the report (if the underlying data is quite dynamic, it would be helpful to increase the frequency) and add or remove recipients who will be receiving this email. 

In our data flow, we will be working with the components below:

We have provided a reference of how the data flow may look.

dataflow overview.png

Configuring the Source Component

First of all, in our data flow, we will be using a REST source component, which uses a REST connection manager that connects to our  Power BI instance. In the source component, after we have selected the Object and Endpoint we want to work with, there are two required parameters we need to set.

Power BI source component general page.png

The first is the Format Parameter, which lets you select the export file type of your preference for the file. This is presented as a dropdown, which allows you to choose one of the available formats for the report export. For this blog post, we will choose PDF, which means the report will be exported and generated as a .pdf file.

format types.png

For the second parameter, we need to get the report ID, which indicates the report we are trying to export. When you access your Power BI instance and navigate to a particular report, you can easily extract the report ID from the URL you have landed on. For instance, if your report URL is https://app.powerbi.com/groups/me/reports/1234494c-e3bb-47bb-b0f9-c0681aa5cadf/ReportSection?experience=power-bi, then your report ID is 1234494c-e3bb-47bb-b0f9-c0681aa5cadf.

Based on the above configuration, the source component will return a column that contains the report file's binary content. Later, we can map it directly into the Email Destination Component's Attachment Content Field for email sending.

To have some additional data to feed the destination component, we add a Premium Derived Column Component directly after the source component. In this component, we will populate a few columns to be used by the downstream pipeline component. As you can see from the screen below, we can use a combination of static values and SSIS variables to populate these new columns.

derived column.png

Configuring the Email Destination Component

Now, we come to the final component of the data flow, which will be an Email Destination Component with the Send Email action. On the Columns Page, we would be looking to map the fields below. To get the two fields, AttachmentContent and AttachmentName, we need to click the Add Attachment button at the top left. Note that the Email Destination Component supports more than one attachment. Then, we would click the same button again to add another pair of filename and file content columns.

email destination column page.png
At this point, the configuration is complete. After executing the package, we should receive a similar email to the one below. You can see that the report is attached to the email successfully as a .pdf file, which is convenient for easy reading and reviewing.
email inbox example.png

Conclusion

Once the process has been automated, it will export your report and send it as an attachment, with no other interaction required on your part. If any tweaks are required they will likely be minor, such as the frequency of sending the report or the recipients who will receive it, which can be easily adjusted. In this guide, we have shown how sending a report, including an external party that does not have access to your environment, is a breeze using SSIS and KingswaySoft components.

We hope this has helped!

    Archive

    November 2024 3 October 2024 1 September 2024 1 August 2024 2 July 2024 1 June 2024 1 May 2024 1 April 2024 2 March 2024 2 February 2024 2 January 2024 2 December 2023 1 November 2023 1 October 2023 2 August 2023 1 July 2023 2 June 2023 1 May 2023 2 April 2023 1 March 2023 1 February 2023 1 January 2023 2 December 2022 1 November 2022 2 October 2022 2 September 2022 2 August 2022 2 July 2022 3 June 2022 2 May 2022 2 April 2022 3 March 2022 2 February 2022 1 January 2022 2 December 2021 1 October 2021 1 September 2021 2 August 2021 2 July 2021 2 June 2021 1 May 2021 1 April 2021 2 March 2021 2 February 2021 2 January 2021 2 December 2020 2 November 2020 4 October 2020 1 September 2020 3 August 2020 2 July 2020 1 June 2020 2 May 2020 1 April 2020 1 March 2020 1 February 2020 1 January 2020 1 December 2019 1 November 2019 1 October 2019 1 May 2019 1 February 2019 1 December 2018 2 November 2018 1 October 2018 4 September 2018 1 August 2018 1 July 2018 1 June 2018 3 April 2018 3 March 2018 3 February 2018 3 January 2018 2 December 2017 1 April 2017 1 March 2017 7 December 2016 1 November 2016 2 October 2016 1 September 2016 4 August 2016 1 June 2016 1 May 2016 3 April 2016 1 August 2015 1 April 2015 10 August 2014 1 July 2014 1 June 2014 2 May 2014 2 February 2014 1 January 2014 2 October 2013 1 September 2013 2 August 2013 2 June 2013 5 May 2013 2 March 2013 1 February 2013 1 January 2013 1 December 2012 2 November 2012 2 September 2012 2 July 2012 1 May 2012 3 April 2012 2 March 2012 2 January 2012 1

    Tags