Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have quite a few embedded reports that users need to be able to click a button and print the full report. I have GCC so I cannot use Power Automate. I saw where I could add the "HTML Content" visual to add a customized print button. I added that then added the following measure for the visual:
Hi @Rhianna_11,
HTML Content doesn't support scripting, and I don't have any plans to include support for this, as I can't supply any tools for debugging scripts if they fail. Custom visuals also have very limited abilities due to the sandboxing that Microsoft imposes upon them for security reasons, so there's a lot of Javascript that won't work and that can make it more confusing for anyone attempting to reproduce something inside it.
Also because custom visuals are sandboxed iframes, they don't know anything about the rest of the report. Even if you could action the print dialog via scripting, you would only be able to print the visual itself and not the rest of the visuals on the report page.
I'm not very familiar with Power BI embedded, but you would likely need to code the functionality to an element (e.g. a button) within the page that hosts your report. It looks like there is a print method that can be used. The folks that work with Power BI Embedded frequent the Developer forum on these community boards, so you may have more luck posting your request there.
Regards,
Daniel
Proud to be a Super User!
My course: Introduction to Developing Power BI Visuals
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)