Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (11.1k points)
edited by

How can generate power bi reports into a webpage and I want to add the reports into the webpage so that I want to export the report into the pdf, I am using the report. print() or window.print(), but none works 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

var saveAsParameters = {
    name: "newReport"
};
report2.saveAs(saveAsParameters); --nothing happens report.saveas also nothing happens

window.print(); --it prints a blank page.

1 Answer

0 votes
by (22.5k points)

I will be soon available in the form of API

Interactive mode: Which has End users interact with a report and export their own view of the data.
Non-interactive mode: Which has Offline generation of snapshots distributed to different people in the organization.

            Learn more about Power BI by enrolling in the Power BI Certification course  

Related questions

0 votes
1 answer
0 votes
1 answer
asked Feb 8, 2021 in BI by Chris (11.1k points)

Browse Categories

...