Yes you can. Use the runReportToPdf method of JasperRunManager. This is what
I do to view my report without storing to local disk:
byte bytes =
ServletOutputStream ouputStream =
ouputStream.write(bytes, 0, bytes.length);
where reportFile is the compiled report, parameters is the HashMap
containing report parameters and getDBConnection() returns a connection to
There also numerous examples in the samples directory of the jasperreports
distribution. In particular check out the webapp demo.
> -----Original Message-----
> From: Scott Smith [SMTP:scott.smith@...]
> Sent: 04 December 2002 16:24
> To: jasperreports-questions@...
> Subject: [jasperreports-questions] pdf files
> Is there a way to make the PDF files pop-up when you run them instead of
> just storing them to your local drive? Any help would be appreciated.
> Scott Smith
> Enterprise Java Developer
> The information contained in this e-mail message is intended only for the
> personal and confidential use of the recipient(s) named above. If the
> reader of this message is not the intended recipient or an agent
> responsible for delivering it to the intended recipient, you are hereby
> notified that you have received this communication in error and that any
> review, dissemination, distribution, or copying of this message is
> strictly prohibited. If you have received this communication in error,
> please notify us immediately by e-mail, and delete the original message.