Forum Discussion
ValeraBRZ
3 years agoFrequent 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-report-report-print // Get a re...
ValeraBRZ
3 years agoFrequent Visitor
Hi Anonymous ,
the solution does not work.
The report does not appear in Preview window.
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.
...
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?
Best Regards