Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Has anyone found a way to use Logic Apps to cycle through paginated reports and send them out?

We're having issues replacing our old in house bespoke reporting application that runs T-SQL queries and sends a basic output to a defined list of recipients or saves to a folder location. 

 

We're building paginated reports to replace the old sources used by the bespoke app, but the real sticking point is, with configuration tables existing in our Azure SQL server, we can't seem to get Logic Apps on the Azure service to cycle through the list of reports, read from the config tables so it knows which report to run at what time and who or where it should go to.

Power Automate has been ruled out as an option so Logic Apps is the only way forward. (One key reason we can't just use normal subscriptions per report is that we have to be able to send reports out using our own domain name, not power bi dot com.)

 

I'm not expecting a detailed blow by blow set of instructions by any means but if anyone has achieved a solution of external report sending at a significant scale with their own email address as the sender and could point me to some resources that could help I'd be really grateful!

2 REPLIES 2
kenger
Frequent Visitor

Although I don't know about the email part, we have successfully used Logic Apps to feed parameters into paginated reports and produce lots of PDFs. We did this by constructing a JSON array for each report in SQL, and putting each JSON array into a separate cell in a column in an Excel table, and then feeding the JSON array into the action 'Export to File for Paginated Reports'. You might be able to avoid constructing the JSON array if you aren't using multi-value parameters in your .RDL. I didn't set up the Logic App myself but I posted a screenshot; it is pretty simple, figuring out to use JSON was the tricky part.

JSON pattern for each report is:

[{"name": "YourParameterName1", "value": "YourParameterValue1"}, {"name": "YourParameterName2", "value": "YourParameterValue2"} ... ]

kenger_0-1679143086111.png

 

R1k91
Continued Contributor
Continued Contributor

no experience with Logic App... sorry.

 

just guessing... couldn't be an interesting approach to use the brand new sql-docs/sp-invoke-external-rest-endpoint-transact-sql.md at live · MicrosoftDocs/sql-docs · GitHub to manage API calls directly from ASQL?

should be a set of calls:

- post Reports - Export To File - REST API (Power BI Power BI REST APIs) | Microsoft Learn

- get Reports - Get Export To File Status - REST API (Power BI Power BI REST APIs) | Microsoft Learn

- get Reports - Get File Of Export To File - REST API (Power BI Power BI REST APIs) | Microsoft Learn

probably you'll need an app in anycase to render the pdf stream from the last call...

 

sorry I'm sure it's not what you were searching for.

 

 

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

Top Solution Authors
Top Kudoed Authors