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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
ValeraBRZ
Frequent Visitor

Customizing Header and Footer text in Embedded Power BI print functionality

Hi,
we are using Power Bi Embedded print functionality.
https://learn.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/report.report#powerbi-client... 

 

 

// Get a reference to the embedded report HTML element
var embedContainer = $('#embedContainer')[0];
// Get a reference to the embedded report.
report = powerbi.get(embedContainer);
// Trigger the print dialog for your browser.
try {
  await report.print();
}
catch (errors) {
  Log.log(errors);
}

 

 


How to customizing Header and Footer text in Embedded Power BI print functionality ?

ValeraBRZ_0-1673603786900.png

Thanks

4 REPLIES 4
ValeraBRZ
Frequent Visitor

Hi @Anonymous ,

the solution does not work.
The report does not appear in Preview window.
windowprint.jpg

 

 

 

            var printContents = document.getElementById(reportDivId).innerHTML;
            //Calling Print Window
            var printWin = window.open('', '', 'fullscreen=yes');
            printWin.document.header = "BRZ 365 BI";
            printWin.document.footer = "My footer";
            //Opening Print Window
            printWin.document.open();
            //Adding Content in Print Window
            printWin.document.write(printContents);
            //Closing Print Window
            printWin.document.close();
            //Focusing User to Print Window
            printWin.focus();
            //Calling Default Browser Printer
            printWin.print();
            //Closing Print Window
            printWin.close();

 

 

 


A "Power BI Client API" must always be used.

ValeraBRZ_0-1673950648466.png

 

 

 

...
  report = powerbi.get(embedContainer);
  await report.print();

 

 

 

This is definitely a bug of "Power BI Client API". 

The report has a name.
Why is this name not displayed in the header area during printing?

ValeraBRZ_1-1673947607369.png

 



Best Regards

Anonymous
Not applicable

Hi @ValeraBRZ ,

I have found a similar post, please refer to it to see if it helps you.

jquery - How to add custom logo (header & footer) while printing a Power BI embedded report? - Stack...

 

vpollymsft_0-1673917999671.png

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ValeraBRZ
Frequent Visitor

Thank you for the quick reply.
The paginated report is out of the question with us.
We have a lot of power bi reports that are already in use by customers.
We use "Live Connection to Analysis Services" and "row level security".
Is there at least one way that the text "Microsoft Power BI" in header  can be changed when printing .
I understand that Microsoft is doing an advertisement for its product.
But we use a paid "Embedded Power BI" and can decide the same what to display.

Kindly help. Thanks in advance.

Anonymous
Not applicable

Hi @ValeraBRZ ,

For that you need to use power bi paginated report

https://www.youtube.com/watch?v=XSIbRNXGgPQ

https://www.youtube.com/watch?v=ZQJUP3-XDu0

 

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.

Top Solution Authors