StiViewerFx in a mx:Window

Stimulsoft Reports.Flex discussion
Locked
RamiA
Posts: 2
Joined: Mon Nov 21, 2011 5:26 pm

StiViewerFx in a mx:Window

Post by RamiA »

Hey guys,

We're working on an AIR application, and we've been testing out your product over the past few days. We created a mini application with your component and everything was working as intended, but when we integrated the component in our main app, we noticed an issue. The buttons on the main toolbar were acting strangely. Specifically, the tooltips were cut off, and the Print and Save buttons weren't doing anything.

I went back to our mini-application to try and reproduce this (to see what is going on), and finally managed to do so.

Our main application is structured as follows:

main app file : : this does all the pre-loading etc, and then opens the mainWindow file. This window is invisible.
mainWindow : : this is the main screen of our app, with all screens loaded as states in here.

When I re-created the same scenario in my mini-application, the print/save dialogs were appearing in the main window, not in the one where the report is. In our main app, that window is invisible, so the dialogs never appear. Is this a known issue? If so, is there a way around it?

Currently, this is basically the only thing holding us back from purchasing :)

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

StiViewerFx in a mx:Window

Post by Vladimir »

Hello,

If our component is located in the additional window, you must define it as a major by the below static options:

StiApplication.main = activeWindow;

If you want to set it as the main window of the main application window, please set the specified option to null:

StiApplication.main = null;

Thank you.
RamiA
Posts: 2
Joined: Mon Nov 21, 2011 5:26 pm

StiViewerFx in a mx:Window

Post by RamiA »

Thanks for that!

That seemed to do the trick, in the sense that the print/save dialogs are now showing up. Those windows still seem to be anchored to some other parent though.. they don't appear in the right place, and as I drag them around, they seem to disappear, as if there's an invisible window that they're contained in. Is there a way to set their parent window manually?

Also, the dialogs don't seem to be inheriting the style of the ViewerFx component. In our app, we have a default button style, which I don't want to carry on to the Viewer, so I've overriden it in my css file as:

viewer|StiViewerFx Button

This is not inheriting to the dialogs though.

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

StiViewerFx in a mx:Window

Post by Vladimir »

Hello,
That seemed to do the trick, in the sense that the print/save dialogs are now showing up. Those windows still seem to be anchored to some other parent though.. they don't appear in the right place, and as I drag them around, they seem to disappear, as if there's an invisible window that they're contained in. Is there a way to set their parent window manually?
We could not reproduce the error. Could you describe it in more detail and show it on the screenshots?
Also, the dialogs don't seem to be inheriting the style of the ViewerFx component. In our app, we have a default button style, which I don't want to carry on to the Viewer, so I've overriden it in my css file as:

viewer|StiViewerFx Button

This is not inheriting to the dialogs though.
Styles for the viewer can be set using the following option:

StiThemeManager.theme = StiTheme.blue;
StiThemeManager.theme = StiTheme.silver;
StiThemeManager.theme = StiTheme.black;

Unfortunately, the report designer does not support this themes.

Thank you.
Locked