Jump to content
Changes to the Jaspersoft community edition download ×

jasperviewer closes my application!


Recommended Posts

When i close the jasperviewer report that is opened up, my main application window is closed at the same time. Is there anyway to stop this.

Also, i have chosen adobe as my external pdf reader, id there anyway to use adobe to view these, rather than the jasper viewer?



Link to comment
Share on other sites

  • Replies 9
  • Created
  • Last Reply

Top Posters In This Topic


in the constructor of JasperViewer there is boolean indicating whehter it should perform an exit on close.


With the viewer you can't view pdf files, you just view the jasper reports. To view pdf files you probably need to use something like JDIC or get a (commercial and most of the times pretty expensive) java implementation of a pdf viewer. There used to be a nice java-com bridge available (njawin) which is now commercially available (http://www.javain.com).


kind regards,


Link to comment
Share on other sites

Hey, thanks for your help, but i still cant figure it out. I can see the constructer takes a boolean, so I tried:


JasperViewer jv = new JasperViewer(jasperPrint, false);


but it still closes...

I tried "true" aswell


Help would be much appreciated.

Link to comment
Share on other sites

try this..hehe...hope it helps


jasperReport = JasperCompileManager.compileReport( "reportloh.jrxml");

jasperPrint = JasperFillManager.fillReport( jasperReport, parameters, conn);

JasperViewer jv = new JasperViewer( jasperPrint, false );

jv.viewReport( jasperPrint, false );


dont know why the viewReport need to specify the jasperPrinter and booolean again...hehe....but this is the way...hehe...:P

Post edited by: loonyew, at: 2006/08/26 11:34

Link to comment
Share on other sites

  • 6 years later...
  • 9 months later...
  • 2 months later...
  • 3 months later...
  • 9 months later...

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...