abbasl7 Posted March 28, 2014 Share Posted March 28, 2014 Hi,We've been developing an iReport Plugin to meet our requirements. We have made very good progress so far.Now, we also need a way to secondary Open action. We'd like to open reports by connecting to a Database and load JRXML content from table.I'm interested to do it in some in-memory way without any local file, if possible. If not, I can save a copy to a local directory and load from there.To start with this, I did spend a lot of time looking for right location to seek guidance, but couldn't find a better one so far. Based on what I could gather so far, I tried doing this on a button click:File file=new File("D:/temp.jrxml");new JrxmlLoader().reloadJasperDesign(new FileInputStream(file));As I expected, it errored. Error Log:java.lang.IllegalStateException: You are trying to load a jrxml file from an event thread. Don't do that.at com.jaspersoft.ireport.designer.JrxmlLoader.reloadJasperDesign(JrxmlLoader.java:82)at com.ul.myapp.reportassistant.components.MyAppToolbar.jButton1ActionPerformed(MyAppToolbar.java:826)at com.ul.myapp.reportassistant.components.MyAppToolbar.access$2000(MyAppToolbar.java:69)at com.ul.myapp.reportassistant.components.MyAppToolbar$15.actionPerformed(MyAppToolbar.java:490)at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)at java.awt.Component.processMouseEvent(Component.java:6505)at javax.swing.JComponent.processMouseEvent(JComponent.java:3320)at java.awt.Component.processEvent(Component.java:6270)at java.awt.Container.processEvent(Container.java:2229)at java.awt.Component.dispatchEventImpl(Component.java:4861)at java.awt.Container.dispatchEventImpl(Container.java:2287)at java.awt.Component.dispatchEvent(Component.java:4687)at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)at java.awt.Container.dispatchEventImpl(Container.java:2273)at java.awt.Window.dispatchEventImpl(Window.java:2719)at java.awt.Component.dispatchEvent(Component.java:4687)at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)at java.awt.EventQueue.access$200(EventQueue.java:103)at java.awt.EventQueue$3.run(EventQueue.java:694)at java.awt.EventQueue$3.run(EventQueue.java:692)at java.security.AccessController.doPrivileged(Native Method)at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)at java.awt.EventQueue$4.run(EventQueue.java:708)at java.awt.EventQueue$4.run(EventQueue.java:706)at java.security.AccessController.doPrivileged(Native Method)at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)at java.awt.EventDispatchThread.run(EventDispatchThread.java:91) Can someone help me the best way to do this?Also, if there is a specific location where I can discuss problems related to iReport Plugin Development problems (Not those for generic Netbeans Plugin Development), please do let me know. Thanks! Link to comment Share on other sites More sharing options...
hozawa Posted March 29, 2014 Share Posted March 29, 2014 This isn't an answer to your question but really should stop working with iReport because it won't fully function with newer versions of JasperReports and Jaspersoft isn't going to fix them. 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