erikd Posted January 24, 2012 Share Posted January 24, 2012 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 More sharing options...
erikd Posted May 3, 2012 Author Share Posted May 3, 2012 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now