Jump to content
Changes to the Jaspersoft community edition download ×

Jasper viewer help-


2004 IR Help

Recommended Posts

By: raf78 - raffeo

Jasper viewer help-

2005-03-23 06:43

Hi.

Sorry for my English.

I have a problem with Jasper Viewer.

I have a jdialog and when i click on a button i need load

a report.

I do this with this code.

JRDataSource jrds = new JRResultSetDataSource(risultato2);

JasperCompileManager.compileReport(xmlFileName);

JasperCompileManager.compileReportToFile(xmlFileName, jasperFileName);

java.util.HashMap map = new java.util.HashMap();

map.put("MyParam",new Integer( 100 ) );

 

JasperPrint print=null;

JasperReport report =JasperManager.loadReport(jasperFileName);

 

print = JasperFillManager.fillReport(report ,map,jrds);

JasperViewer.viewReport(print);

 

 

The problem is that when jasperviewer is open i can't

click and do anithing on it because is like not enable.

Can you help me?

thanks

 

 

 

 

By: Howard - htreisman

RE: Jasper viewer help-

2005-06-13 02:10

I've had the same problem. I think it's something to do with JasperViewer.viewReport() creating a frame.

 

The workaround is to create a JRViewer (which subclasses JPanel), and embed that inside a JDialog. Make sure you instantiate the JDialog as modal, and with your existing dialog as the parent.

 

Good luck!

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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