Jump to content
We've recently updated our Privacy Statement, available here ×

Calling "Preview" button from another listener


erikd

Recommended Posts

Hi,

I am trying to call the "Preview", which is the button between "XML" button and "Query Report" Icon, from another location. 

My code are as follows:

        JrxmlVisualView jrxmlVisualView         = IReportManager.getInstance().getActiveVisualView();
        JrxmlEditorSupport jrxmlEditorSupport   = jrxmlVisualView.getEditorSupport();
        MultiViewDescription[] multiViewDescriptions = jrxmlEditorSupport.getDescriptions();
        JrxmlPreviewView jrxmlPreviewView       = (JrxmlPreviewView)multiViewDescriptions[2];
        jrxmlPreviewView.componentShowing();

It compiles perfectly, but it does not change the screen to Preview view.  How do I change the screen to display the preview without manually clicking the "Preview" button?

Any input is highly appreciated.

Thanks.

Erik

Link to comment
Share on other sites

  • 3 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Does anybody have an idea on this?

Is there a way to switch screens from "Designer" screen to "Preview" screen from another action class?

I copied the runReport function of iReport which includes lines which invoke "IReportCompiler ic = new IReportCompiler();" and used "RequestProcessor.Task task = RequestProcessor.getDefault().post(ic);" to execute the process in another action class.  But this only works if I initially press on the "Preview" button.  If I don't it won't switch to "Preview" screen.

I hope somebody can help me on this.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...