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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
lovishsood1
Helper III
Helper III

Print an embed Report

Hey Everyone,

 

I'm trying to print an EMBEDDED REPORT but it is returning blank because I'm trying to print entire page along with other content of Website but it is getting blank for Power BI page?

 

Any idea how can i resolve it?

 

tried using REACT - powerbi-client & html2canvas.

 

lovishsood1_0-1750143467529.png

 

5 REPLIES 5
v-ssriganesh
Community Support
Community Support

Hi @lovishsood1,

Thank you for posting your query in the Microsoft Fabric Community Forum, and thanks to @Poojara_D12  & @BhavinVyas3003 for sharing valuable insights.

 

Could you please confirm if your query has been resolved by the provided solution? If so, please mark it as the solution. This will help other community members solve similar problems faster.

Thank you.

Hi @v-ssriganesh ,

 

Not really, I wanted to capture the snapshot of embedded report on click of button , so that if user has put any slicer value then also I can fetch image of Report(Filtered one).

 

This is still not achieved. I'm trying the NODE-JS sample code provided by Microsoft.

Poojara_D12
Super User
Super User

Hi @lovishsood1 

You're trying to print a web page that contains an embedded Power BI report (using the powerbi-client library in React), but the printed output is blank where the Power BI report should appear. This happens because embedded Power BI reports are rendered within an iframe using dynamic JavaScript and cross-origin content, which standard browser print mechanisms (and tools like html2canvas) struggle to capture. html2canvas, for instance, cannot render iframe contents due to browser security restrictions (CORS policy), which leads to blank areas in the generated print or screenshot.

 

To work around this, consider using Power BI's native "Export to PDF" or "Export to PPTX" capabilities via the Power BI REST API or the Export button in the Power BI report itself, if available. Another option is to programmatically export the visual/report to a PDF on the server side, using a service principal or embed token with export permissions, and then render or print that PDF within your React app. If you absolutely need to print the full webpage with embedded visuals, one workaround is to capture the report area separately (e.g., via a screenshot tool that supports CORS iframes or by calling Power BI’s exportToFile API), and inject the image into the DOM before printing. Unfortunately, pure front-end solutions like html2canvas or standard browser print won't work reliably with embedded Power BI content due to how it's sandboxed for security.

 

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS
BhavinVyas3003
Solution Sage
Solution Sage

Use Power BI Export To File API to generate PDF/image of the report, then include that in your webpage for printing.


Thanks,
Bhavin
Problem solved? Hit “Accept as Solution” and high-five me with a Kudos! Others will thank you later!

can you share the code or relevant functions?

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.