Jump to content

Strange Problem With Jasper Report


2005 IR Help

Recommended Posts

By: Chetan - someone_genius

Strange Problem With Jasper Report

2004-10-02 03:46

Hello!

 

I have created one class which deals with the all functions of jasper. Have one method which runs the report in the Report Viewer.

Code is

 

JasperViewer.viewReport(jrprintFile, false);

 

I am calling this method from the jsp in jsp page.

 

But when I do this from client machine, it opens the report viewer on the server.

 

I need that viewer should be open on client machine.

 

How to do this?

 

Regards,

Chetan Parekh

 

 

 

 

By: rpgmr - rpgmr

RE: Strange Problem With Jasper Report

2004-10-03 19:24

Install viewer on client machine, spawn a new process and invoke the local program.

 

 

 

 

By: David Rudder - drig

RE: Strange Problem With Jasper Report

2004-10-04 11:09

The way you're doing it requires you to have the report viewer installed on the client. It would probably be better to return either an HTML or a PDF version, which you can be reasonably sure the client has support for. To do this, try:

 

byte[] report = JasperPrintManager.printReportToPdf(jrprintFile);

 

response.setContentType ("application/pdf");

response.getOutputStream().write (report, 0, report.length);

 

(This is assuming you're using servlets).

 

-Dave

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