Hide save and print button
Posted: Fri May 04, 2018 1:18 pm
I know how to hide them in the options object, but can i hide these buttons after the viewer is loaded?
thanks
JB
thanks
JB
Reporting tool and data analytics tools for creating reports and dashboards in ASP.NET, ASP.NET MVC, .NET Core, Blazor, Angular, PHP, Python, WPF, JavaScript, and Java applications.
https://forum.stimulsoft.com/
Code: Select all
<head>
<script>
var options = new Stimulsoft.Viewer.StiViewerOptions();
var viewer = new Stimulsoft.Viewer.StiViewer(options, "StiViewer", false);
var report = new Stimulsoft.Report.StiReport();
report.loadFile("Reports/SampleReportWithEditableText.mrt");
viewer.renderHtml("viewerCont");
viewer.report = report;
var toolbarTable = viewer.jsObject.controls.toolbar.firstChild;
viewer.jsObject.controls.toolbar.removeChild(toolbarTable);
var userToolbar = document.createElement("div");
viewer.jsObject.controls.toolbar.appendChild(userToolbar);
var userToolButton = document.createElement("div");
userToolButton.style.background = "red";
userToolButton.style.width = userToolButton.style.height = "25px";
userToolbar.appendChild(userToolButton);
userToolButton.onclick = function () {
viewer.jsObject.postExport(exportType, viewer.jsObject.getDefaultExportSettings(exportType));
}
</script>
</head>
<body>
<div id="viewerCont"></div>
</body>