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

Show jasper viewer modally


Recommended Posts

By: Alexander Wallace - aows

Show jasper viewer modally

2003-12-08 16:34

Is it possible to show the jasper viewer modally? Currently I register a window event listener to the viewer but it a pain if you have multiple viewers that shoudl show one after another.

 

Thanks!

 

 

 

 

By: Thomas Wegmueller - twegmueller

RE: Show jasper viewer modally

2003-12-08 23:56

No, you can not without doing your own JasperViewer, as dori.jasper.view.JasperViewer is derived from javax.swing.JFrame - which can not (up until now) be made modal.

Easiest solution is to take the source of dori.jasper.view.JasperViewer and change it to be derived from JDialog, or even take just the dori.jasper.view.JRViewer (which is a panel) and add that to a custom frame of yours.

 

Regards!

 

 

 

 

By: Alexander Wallace - aows

RE: Show jasper viewer modally

2003-12-11 10:48

Thankyou... I tried putting the view inside of a dialog but then the print dialog is disabled... It can be displayed but no buttons in it worked....

Link to comment
Share on other sites

  • 3 years later...
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Hi:

To use JasperViewer with a modal jDialog all you have to do is remove the modal property to the jDialog before show the Jasper Viewer. Here is an example:

jv = new JasperViewer(jp, false);
setModal(false);
jv.setTitle("Title");
jv.setVisible(true);
setModal(true);

Wtih this you can have all the Jasper Viewer' s you need. Hope this help.

Link to comment
Share on other sites

  • 13 years 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...