powerbi-js-api

How to generate PDF output of powerbi embedded report

跟風遠走 提交于 2019-12-22 05:23:14
问题 I have a powerbi report embedded to my webpage. What I need is to add an "export" button to my page and export the report to the PDF when the button is clicked. How can I achieve this? People online advises using report.print() or window.print() , but both did not work for me. var reportContainer = document.getElementById('reportContainer'); var report = powerbi.embed(reportContainer, config); var report2 = powerbi.get(reportContainer); console.log(report); --returns the report console.log

How to generate PDF output of powerbi embedded report

北城以北 提交于 2019-12-05 08:32:17
I have a powerbi report embedded to my webpage. What I need is to add an "export" button to my page and export the report to the PDF when the button is clicked. How can I achieve this? People online advises using report.print() or window.print() , but both did not work for me. var reportContainer = document.getElementById('reportContainer'); var report = powerbi.embed(reportContainer, config); var report2 = powerbi.get(reportContainer); console.log(report); --returns the report console.log(report2); --also returns the report report.print(); --nothing happens report2.print(); --nothing happens