Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
How do I add the print and download/export report buttons in the PowerBI report that is embedded in a web application?
These buttons are present in the Power BI service:
But not available once the report is embedded.
Solved! Go to Solution.
Hi @Anonymous ,
To add print button and download button, you can get it by Javacript API:
// Embed the report
var embedContainer = $('#embedContainer')[0];
var config = {
type: 'report',
tokenType: models.TokenType.Embed,
accessToken: 'YOUR_ACCESS_TOKEN',
embedUrl: 'YOUR_EMBED_URL',
id: 'YOUR_REPORT_ID',
permissions: models.Permissions.All,
settings: {
filterPaneEnabled: false,
navContentPaneEnabled: false
}
};
var report = powerbi.embed(embedContainer, config);
// Add the print button
var printButton = $('#printButton');
printButton.on('click', function() {
report.print();
});
// Add the export button
var exportButton = $('#exportButton');
exportButton.on('click', function() {
report.exportData(models.ExportDataType.Summarized);
});
Best Regards
Hi @Anonymous ,
To add print button and download button, you can get it by Javacript API:
// Embed the report
var embedContainer = $('#embedContainer')[0];
var config = {
type: 'report',
tokenType: models.TokenType.Embed,
accessToken: 'YOUR_ACCESS_TOKEN',
embedUrl: 'YOUR_EMBED_URL',
id: 'YOUR_REPORT_ID',
permissions: models.Permissions.All,
settings: {
filterPaneEnabled: false,
navContentPaneEnabled: false
}
};
var report = powerbi.embed(embedContainer, config);
// Add the print button
var printButton = $('#printButton');
printButton.on('click', function() {
report.print();
});
// Add the export button
var exportButton = $('#exportButton');
exportButton.on('click', function() {
report.exportData(models.ExportDataType.Summarized);
});
Best Regards
User | Count |
---|---|
5 | |
5 | |
3 | |
2 | |
2 |
User | Count |
---|---|
9 | |
7 | |
5 | |
4 | |
4 |