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.