Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hi,
I have a requirement to disable the export data option on live reports and provide a button that will do the same. The report table data should download when this button is clicked.
any suggestions? It's pretty urgent
Thank you
Hello,
To achieve this, you can follow these steps:
Disable the Export Data Option:
If you’re using Power BI, you can disable the export data option for specific reports by going to the report settings and setting the “Export Data” option to "None".
For ASP.NET Core Report Viewer, you can hide the export options using the exportOptions property.
Create a Custom Download Button:
You can add a custom button to your report or web page that triggers the download of the table data. Here’s a basic example using Javascript:
<button id="downloadButton">Download Data</button>
<table id="dataTable">
<!-- Your table data here -->
</table>
<script>
document.getElementById('downloadButton').addEventListener('click', function() {
var table = document.getElementById('dataTable');
var rows = table.rows;
var csvContent = '';
for (var i = 0; i < rows.length; i++) {
var cells = rows[i].cells;
var rowContent = [];
for (var j = 0; j < cells.length; j++) {
rowContent.push(cells[j].innerText);
}
csvContent += rowContent.join(',') + '\n';
}
var blob = new Blob([csvContent], { type: 'text/csv' });
var url = window.URL.createObjectURL(blob);
var a = document.createElement('a');
a.setAttribute('href', url);
a.setAttribute('download', 'table_data.csv');
a.click();
});
</script>
This script will create a CSV file from the table data and download it when the button costcoess is clicked.
Hello,
Remove Export to Excel/CSV: In the Power BI Desktop, go to View -> Data View, and right-click on the table you want to disable exports for. Uncheck Export Data: In the Properties pane, uncheck the Export Data option. Create a Custom Action: In the Power BI Desktop, go to View -> Data View, right-click on the table, and select New Custom Action. Define Action: In the New Custom Action dialog, give the action a Patient Gateway name and define the logic to download the data (e.g., using a REST API call or DAX query). Add Button: Add a button to your report and assign the custom action to it. Develop a Custom Visual: Create a custom visual that replaces the default table visual and disables the built-in export functionality. Implement Download Button: Add a button to the custom visual that triggers the download functionality when clicked.
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 22 | |
| 10 | |
| 10 | |
| 7 | |
| 5 |