http://ajava.org/hot/print/16569.html
http://www.techienuggets.com/Comments?tx=25302
62547 | 2008-02-18 14:44:11.0 | Can you try JasperViewer jrviewer = new JasperViewer(jasperPrint, false); instead of JasperViewer jrviewer = new JasperViewer(jasperPrint); and see if it works? http://jasperreports.sourceforge.net/api/net/sf/jasperreports/view/JasperViewer.html#JasperViewer(net.sf.jasperreports.engine.JasperPrint,%20boolean) regards, karthik Jacques Nogueira dos Santos wrote: > > > > Hello, I´m having a problem with jrviewer. > > I have a form that let´s the user inform the values for the report. On > the action of the button has the following code: > > > > . > > . > > . > > JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, > map,con); > > JasperViewer jrviewer = new JasperViewer(jasperPrint); > > jrviewer.setDefaultCloseOperation( DISPOSE_ON_CLOSE ); > > jrviewer.setVisible(true); > > > > > > When I click on 'X' of the jrviewer, it´s close all the project. So I > used the DEBUG and on Local Variables/ jrviewer, the isExitClose has > value TRUE. > > > > > > What´s happening? What must I do so as to solve this problem? I want > the jrviwer just dispose on close, and the first Form continue > visible, not closing all the project. > > > > > > Thanks. > |
97118 | 2008-05-11 23:13:14.0 | You should call JasperViewer instance with following code. JasperViewer jasperViewer = new JasperViewer(jasperPrint, false); Because: ============================================ public JasperViewer(JasperPrint jasperPrint){ this(jasperPrint, true); } public JasperViewer(JasperPrint jasperPrint, boolean isExitOnClose){ this(jasperPrint, isExitOnClose, null); } ============================================ JasperViewer(JasperPrint jasperPrint) constructor calls JasperViewer with exit on close. |
184780 | 2008-11-24 20:45:36.0 | Thankyou so much karthik, I saw your codes its working so fine and fulfilled my requirement. regards, Rohit. |