Category / Section
How to show or hide the Report Viewer toolbar options?
Published:
Updated:
The following section explains how to customize the Report Viewer toolbar and show or hide toolbar items.
Show or Hide toolbar items
To show or hide specific toolbar items, you need to set the toolbarSettings
property. The following example code snippet shows how to hide the parameter option from the toolbar.
$("#viewer").boldReportViewer({
toolbarSettings: {
items: ej.ReportViewer.ToolbarItems.All & ~ej.ReportViewer.ToolbarItems.Parameters
}
});
Similarly, you can show or hide all other toolbar options with the help of toolbarSettings.items
enum.
Hide Toolbar
To hide the entire Report Viewer toolbar, you need to set the showToolbar
property to false as shown in the below code snippet.
$("#viewer").boldReportViewer({
toolbarSettings: {
showToolbar: false
}
});
Show or Hide specific export options
You can show or hide specific export types in the Report Viewer toolbar using the exportOptions
property. The following example code shows how to hide the HTML
export type from the default export options.
$("#viewer").boldReportViewer({
exportSettings: {
exportOptions:ej.ReportViewer.ExportOptions.All & ~ej.ReportViewer.ExportOptions.Html
}
});