Restricting User Options

Stimulsoft Reports.WEB discussion
Post Reply
Oaktree
Posts: 25
Joined: Wed Apr 28, 2010 8:53 am

Restricting User Options

Post by Oaktree »

I have a few questions.

I'm currently testing using version 2010.1.634.0 of the product.

Designer

Menu related

1. When handling the Designer.SaveReportAs event, is there a way to suppress the client mht report file download that pops up afterwards? I am trying to store all files on the server so that users do not have to manage them.
2. Alternately, is there a way to suppress the menu entirely (while leaving the single save button next to the menu available)? We would likely not need many of the options on the menu since they can be handled programmatically. Alternately, see question 3. Completely hiding the options would be just as useful.
3. When using options such as "StiWebDesignerOptions.Menu.OpenReport = False", is there a reason why the options are grayed out on the menu instead of hidden completely from the users? I can see it leading to users asking us why the options are not available to them.

Preview related

1. Is there a way to hide the Print, Open, and Save buttons?
2. Is there a reason why the preview tab has its own zoom bar? It may be confusing to users to have to manage two zoom bars.

Viewer

1. Is there a reason why the Report Names cannot handle spaces? When saving documents that have a space in the file name, the file is presented as the first word without an extension. For example, let's say I had a report called "Organization Information Report". Saving the file from the Viewer results in "Organization" instead of "Organization Information Report.pdf" for example.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Restricting User Options

Post by Vladimir »

Hello,

Designer

1. You can use "Page.Response.End();" in OnSaveAs event, or disable "Save As..." menu item.
2. 3. At this moment it is impossible to hide the menu and its items, but it will be implemented in next versions.

Preview related

1. At this moment it is impossible, but it will be implemented in next versions.
2. This is because the viewer is inserted into the designer as a separate control of their controls.

Viewer

1. This bug has been fixed in latest versions of our product.


Thank you.
Oaktree
Posts: 25
Joined: Wed Apr 28, 2010 8:53 am

Restricting User Options

Post by Oaktree »

For the Designer, when I specify "Page.Response.End()", a page pops up and throws an XML parsing error similar to the following:
XML Parsing Error: no element found
Location: http://localhost/test.aspx?stimulsoft_d ... 3530a043b8
Line Number 1, Column 1:
Is there a Designer setting that needs to be specified so that the window isn't opened?

I should clarify that the window is opened as soon as the event is fired. I can tell because when I put a breakpoint in the function call, the window exists as soon as the event triggers, but the error does not show up until the event is done firing.

Thanks for the advice.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Restricting User Options

Post by Vladimir »

Hello,

Please try to use the following code:

Code: Select all

try
{
  Page.Response.Flush();
  Page.Response.End();
}
catch
{
}
Also we have added a new SaveAsMode property to StiWebDesigner control. If it is set to Hidden, the window will not appear, and the event OnSaveAs will work the same way as event OnSave. The update will be available in the next prerelease build from May 3.

Thank you.
Oaktree
Posts: 25
Joined: Wed Apr 28, 2010 8:53 am

Restricting User Options

Post by Oaktree »

I updated to the latest prerelease version and used the property specified. The changes you made worked as expected.

Let me know when/if the other changes make it into the build if you can. The first preview related change as noted in the initial post would be particularly helpful since we do not want users have access to any of the files.

Thanks again.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Restricting User Options

Post by Vladimir »

Hello,

Configuration of viewer which built-in in report web designer will be available in the next prerelease build from May 10.

Thank you.
Oaktree
Posts: 25
Joined: Wed Apr 28, 2010 8:53 am

Restricting User Options

Post by Oaktree »

The following all worked like a charm.
StiWebDesignerOptions.Viewer.Toolbar.ShowPrintButton = False
StiWebDesignerOptions.Viewer.Toolbar.ShowSaveButton = False
StiWebDesignerOptions.Viewer.Toolbar.ShowOpenButton = False
Thanks.
Post Reply