remove save to "HTML file" from Export options

Stimulsoft Reports.JS discussion
Post Reply
jcmmde
Posts: 8
Joined: Fri Mar 17, 2017 9:06 pm

remove save to "HTML file" from Export options

Post by jcmmde »

I can't seem to get the "HTML File" off the Save Menu drop down in the viewer.

Code: Select all

var options = new Stimulsoft.Viewer.StiViewerOptions();
options.height = "100%";
options.appearance.scrollbarsMode = true;
options.toolbar.showDesignButton = true;
options.toolbar.printDestination = Stimulsoft.Viewer.StiPrintDestination.Direct;
options.appearance.htmlRenderMode = Stimulsoft.Report.Export.StiHtmlExportMode.Table;
options.toolbar.showAboutButton = false;
options.exports.showExportToPdf = false;
options.exports.showExportToWord2007 = false;
options.exports.showExportToDocument = false;
options.exports.showExportToHtml = false;
Thanks...
Attachments
HTML.png
HTML.png (5.13 KiB) Viewed 3067 times
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: remove save to "HTML file" from Export options

Post by HighAley »

Hello.

There are two exports (HTML and HTML5) are joined in this menu item.
Please, disable both items:

Code: Select all

options.exports.showExportToHtml = false;
options.exports.showExportToHtml5 = false;
Thank you.
jcmmde
Posts: 8
Joined: Fri Mar 17, 2017 9:06 pm

Re: remove save to "HTML file" from Export options

Post by jcmmde »

That worked great for the viewer. Thanks!

Any way to control those same options for the "Preview" window in the Designer?
Attachments
Report_Preview.png
Report_Preview.png (15.19 KiB) Viewed 3027 times
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: remove save to "HTML file" from Export options

Post by HighAley »

Hello.

This task will be a little harder to solve.
You could use next code to hide the exports:

Code: Select all

var designer = new Stimulsoft.Designer.StiDesigner(options, "StiDesigner", false);
designer.renderHtml("content");

var viewer = designer.jsObject.options.viewerContainer.firstChild;
viewer.jsObject.controls.menus.saveMenu.items["Html"].style.display = "none";
viewer.jsObject.controls.menus.saveMenu.items["separator2"].style.display = "none";
Thank you,
ADev2000
Posts: 5
Joined: Tue Jul 16, 2019 8:36 pm

Re: remove save to "HTML file" from Export options

Post by ADev2000 »

I am not able to remove data file export option. Is this the right property?

options.exports.showExportToDocument = false;
Lech Kulikowski
Posts: 6259
Joined: Tue Mar 20, 2018 5:34 am

Re: remove save to "HTML file" from Export options

Post by Lech Kulikowski »

Hello,

To remove Data exports, you should hide CSV, XML, JSON exports.

Thank you.
Post Reply