| Author |
Error while exporting to PDF using Jasper Report
|
Aravind Prasad
Ranch Hand
Joined: Dec 28, 2005
Posts: 258
|
|
Dear Ranchers,
I am trying to export a report in pdf document using jasper report. I got the code from some sites while searching in the google search engine. Attached here with the following files
Below is the error messgae i am getting from the system
Please help me to rectify this problem
Regards
Aravind
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26144
|
|
Aravind,
First of all, note that it's horrible practice to have large chunks of code in a JSP. Good practice would have no code, but static methods are even worse. It makes debugging and maintenance very difficult.
In this particular case, the whole thing should be a servlet and there should be no JSP. After all, if you have a PDF, you shouldn't have HTML too. What would the browser do wit that?
Try copying that large method into a servlet and printing the result to the output.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Aravind Prasad
Ranch Hand
Joined: Dec 28, 2005
Posts: 258
|
|
Hi Jeanne
Thank you for your reply. I am very new to the Jasper Report and I would really appreciate, if i can get a real help of the code, which can able to export to pdf from jasper report.
This is really very urgent.
Thanks/aravind
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56153
|
|
Aravind Prasad wrote:This is really very urgent.
Please read this.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56153
|
|
Jeanne Boyarsky wrote:Try copying that large method into a servlet and printing the result to the output.
Jeanne has already given you the next step.
|
 |
Aravind Prasad
Ranch Hand
Joined: Dec 28, 2005
Posts: 258
|
|
Hi Ranchers,
Thankyou for your inputs. I could finally export the jasper report to PDF format. I have tested it OK.
I have now another problem for passing the parameter to jrxml file to create dynamic report. Every time, depending on the unique key, the report has to bring the information from the database.
Below is the XML code for the report and the the parameter which I am passing is file_no, which I am manipulating in the query.
The jrxml, compiled successfully but in the PDF it is not having any values. Please help me.
Aravind
|
 |
 |
|
|
subject: Error while exporting to PDF using Jasper Report
|
|
|