Is there a way to hide the "Save As" menu item in the Web Designer

Stimulsoft Reports.WEB discussion
Post Reply
smlemmon
Posts: 3
Joined: Sat Apr 10, 2010 6:06 am
Location: UK

Is there a way to hide the "Save As" menu item in the Web Designer

Post by smlemmon »

Hi,

I am very new to Stimulsoft Reports, so please excuse me if this is a silly question.

I just wondered if there is a way to hide the "Save As" button in the Web Designer menu.

The reason for this is that I am saving all ym reports as Binary Data to a database and I do not want the users to be able to save them as a file.

I found some sample code in another thread something to the effect of..

StiMainMenuService mainMenuService = StiMainMenuService.GetService();
mainMenuService.ShowFileReportSaveAs = false;

I am assuming this is for the Windows Designer though as I cant find any reference to it or an assembly that contains the StiMainMenuService.

Any help would be much appreciated.

Many thanks in advance.

Simon
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Is there a way to hide the "Save As" menu item in the Web Designer

Post by Jan »

Hello,

Please use following code before calling report designer:

Code: Select all

Stimulsoft.Report.Web.StiWebDesignerOptions.Menu.SaveAs = false;
Thank you.
smlemmon
Posts: 3
Joined: Sat Apr 10, 2010 6:06 am
Location: UK

Is there a way to hide the "Save As" menu item in the Web Designer

Post by smlemmon »

Hi Jan,

That's perfect - thank you very much.

Simon
DeveloperX
Posts: 1
Joined: Wed Sep 15, 2010 4:14 am

Is there a way to hide the "Save As" menu item in the Web Designer

Post by DeveloperX »

What is the Win Forms version of this code?
Stimulsoft.Report.Web.StiWebDesignerOptions.Menu.SaveAs = false;
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Is there a way to hide the "Save As" menu item in the Web Designer

Post by Alex K. »

Hello,

For Win forms

Code: Select all

            Stimulsoft.Base.Services.StiServiceContainer services = Stimulsoft.Report.StiConfig.Services.GetServices(
                            typeof(Stimulsoft.Report.Design.StiMainMenuService));

            foreach (Stimulsoft.Report.Design.StiMainMenuService service in services)
            {
                service.ShowFileReportSaveAs = false;
            }
Thank you.
Post Reply