Jump to content
Changes to the Jaspersoft community edition download ×

Trouble calling the JRViewer from application


2004 IR Help

Recommended Posts

By: sherifeldibani - sherifeldibani

Trouble calling the JRViewer from application

2005-08-14 20:04

I am having a problem calling the JRviewer from my application. if someone could please let me know how to directly display the report into a viewer for the user to print. I prefer this than having a report PDF generated, saved, opened and the user can select to print it... It takes too long...

 

 

First I fill the report:

 

JasperPrint jasperPrint = JasperManager.fillReport(jasperQuoteRptFile,

parameters, myConnection);

 

Then I want to display it the fastest possible way, i.e. with least steps.... The code below does not open the viewer, but it also does not return any errors...

 

JRViewer viewer = new JRViewer(JasperFillManager.fillReport(

jasperQuoteRptFile, parameters, myConnection));

 

The code below works, but it takes too many steps to produce a quotation...

// JasperPrintManager.printReport(JasperFillManager.

//fillReport( jasperQuoteRptFile, parameters, //myConnection), true);

 

 

 

 

By: Lucian Chirita - lucianc

RE: Trouble calling the JRViewer from applica

2005-08-15 00:34

Hi

 

You need

jasperViewer.setVisible(true);

after you create the viewer. This will show the viewer.

 

Regards,

Lucian

 

 

 

 

By: sherifeldibani - sherifeldibani

RE: Trouble calling the JRViewer from applica

2005-08-15 09:24

Thank you very much Lucian.

I like simple solutions!

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