Bookmarks and the StiSLViewerControl

Stimulsoft Reports.Silverlight discussion
Locked
Scottioioio
Posts: 47
Joined: Thu Dec 20, 2012 6:58 pm

Bookmarks and the StiSLViewerControl

Post by Scottioioio »

I am displaying reports in a Silverlight app using the StiSLViewerControl control. My report has bookmarks.

When the report loads in the control the bookmark pane is displayed. I'd like to not show the bookmark pane unless the user clicks the bookmark button in the toolbar. How do I hide the bookmark pane when the report loads?

I tried the following:

Code: Select all

Stimulsoft.Report.StiOptions.Viewer.Elements.ShowBookmarksPanel = false;
But that hides the bookmark button in the toolbar (as well as the bookmark pane). I want to just hide the bookmark pane on report load w/the ability for a user to view the bookmarks by clicking the button.

Thanks
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Bookmarks and the StiSLViewerControl

Post by HighAley »

Hello.

Unfortunately, it's impossible to hide Bookmark Panel without Bookmark button with code.

Thank you.
Scottioioio
Posts: 47
Joined: Thu Dec 20, 2012 6:58 pm

Re: Bookmarks and the StiSLViewerControl

Post by Scottioioio »

Is it possible to show the bookmark button in the UI, but NOT show the bookmark pane by default? (That is, the user has to click the bookmark button in the toolbar to see the bookmarks?)

What I noticed is that when the bookmark pane is displayed the pages in the report aren't laid out correctly. It's like they are laid out given the size of the report window and then AFTER that the bookmark pane is displayed, which pushes the pages askew. Is there a way to programmatically re-layout the report pages and, if so, is there a way to do so after the bookmark pane is displayed or hidden?

Thanks
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Bookmarks and the StiSLViewerControl

Post by HighAley »

Hello.

Could you send us more information about this issue?
What problem is with layout of report?
Which version do you use?

Thank you.
Scottioioio
Posts: 47
Joined: Thu Dec 20, 2012 6:58 pm

Re: Bookmarks and the StiSLViewerControl

Post by Scottioioio »

Aleskey, I am using version 2012.3.1500.0.

I have a Silverlight Child Window display the report. The Child Window is opened at 95% of the browser's height and width.

The report being displayed is being loaded from the service via WCF.

Here are three screenshots that (I hope) illustrate the problem. If I open the report and click the bookmark button to hide the bookmark pane then it shows as many pages of the report that fit into view (three, in this case).

Image

If I then click the bookmark button it displays the bookmark pane, which pushes the right-most page part way off the screen, but then it automatically readjusts the layout so that the pages are smaller so that all three fit on screen.

Image

However, when the Child Window first loads the bookmark pane is displayed and the three pages are rendered as if the bookmark pane wasn't being displayed. This causes the right-most page to be cut off. Because the pages then aren't auto-resized (as they are in the second screenshot) the result is a layout that has the right-most page cut off, as shown below.

Image

Does this make it clearer? If I am forced to have the bookmark pane displayed when the report first loads that is fine as long as I can have it auto-resize the report so that the right-most page isn't cut off initially.

Thanks
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Bookmarks and the StiSLViewerControl

Post by Alex K. »

Hello,

Thanks for the detailed description of the problem, it is now more or less clear.
We noticed that you are using not our StiWindow class, we have certain bindings to it at when working with the report viewer and designer.
Please try it, do you still have the problem?
If it remains, please send us a simple example of the application which reproduces the problem.

Thank you.
Scottioioio
Posts: 47
Joined: Thu Dec 20, 2012 6:58 pm

Re: Bookmarks and the StiSLViewerControl

Post by Scottioioio »

We noticed that you are using not our StiWindow class, we have certain bindings to it at when working with the report viewer and designer.
I'm confused, why do I need to use StiWindow? In the samples that you provide the only instance of use of the StiWindow class is in the SaveWindow window in the WCF Silverlight demos, and that window doesn't show a report.

In all of the demos the StiSLViewerControl control is in MainPage.xaml, which is a UserControl. In my project the StiSLViewerControl control is in a ChildWindow. Is there a difference between a UserControl and a ChildWindow that would explain this behavior I'm seeing?

Also, for grins I did try to change my ChildWindow to an StiWindow, but didn't get far because it appears that the StiWindow class won't let me specify styling like the ChildWindow does.

Thanks
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Bookmarks and the StiSLViewerControl

Post by Alex K. »

Hello,

The StiWindow desirable to use if you want to display the viewer or designer on the form and not on the page. Because there is a special code that catches the mouse click to close the Popup window in the menu and ContextMenu etc.
The ChildWindow does not support this. For this case we realized setable and styled under our theme the StiWindows class. You may put our controls on the ChildWindow, but then, some functionality will not work.
Also, for grins I did try to change my ChildWindow to an StiWindow, but didn't get far because it appears that the StiWindow class won't let me specify styling like the ChildWindow does.
Which style do you mean? Please describe what our class does not allow?

Thank you.
Scottioioio
Posts: 47
Joined: Thu Dec 20, 2012 6:58 pm

Re: Bookmarks and the StiSLViewerControl

Post by Scottioioio »

Aleksey wrote:
Also, for grins I did try to change my ChildWindow to an StiWindow, but didn't get far because it appears that the StiWindow class won't let me specify styling like the ChildWindow does.
Which style do you mean? Please describe what our class does not allow?
In my Child Window XAML I have the following:

Code: Select all

<controls:ChildWindow ...  Style="{StaticResource ChildWindowStyleReportViewer}">
If I copy and paste that into the XAML for the <slControls:StiWindow>, it compiles but when I run the SL application and click the button to display the window it gives me the following runtime error:
Failed to assign to property 'System.Windows.FrameworkElement.Style'. [Line: 9 Position: 80]
But if I remove that Style setting I can get it to work using StiWindow. However, it doesn't make any difference in the aforementioned problem. When loading the report with the bookmark pane displayed by default, the third page is getting cut off, as in my screenshot above.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Bookmarks and the StiSLViewerControl

Post by Alex K. »

Hello,

Please send us a sample project which reproduces the issue for analysis.

Thank you.
Locked