This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Hands On Software Engineering with Python and have Brian Allbey on-line!
See this thread for details.
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Generate report in servlet using JasperReport  RSS feed

 
Ranch Hand
Posts: 65
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys
I'm here again.
Now my problem is that I can't generate report in my servlet using JasperReports of JasperSoft Studio. I'm initiating in this technology and I'm using sample that I find in internet. The code follow is a code that I have created for desktop and changed to servlet.
Code:

And the log generated:


Another question is that if someone have any tutorial of JasperReport for servlet to send for me?

Thanks in advance.

Cezar apulchro.
 
Ranch Hand
Posts: 99
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I assume you made a typo at line 39. The correct code should be

Do you actually want plain text or your intent is to generate pdf?
 
Cezar Apulchro
Ranch Hand
Posts: 65
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Joseph,
my intent is pdf.

Thanks by your assistance.

Cezar.
 
Cezar Apulchro
Ranch Hand
Posts: 65
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi people,
I'm sending the last version of my java class to help me.

Here is error log:


For constructing this class I search in the following address:

See that,  my class is equal the exemple of packtpub.

Really I can't see what happens.

Thanks in advance.

Cezar.
 
Cezar Apulchro
Ranch Hand
Posts: 65
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi people,
that is my last test to solve the problem.

This is the error log:

Please I need help, I don't have more ideas.

Thanks.

Cezar.
 
Ranch Hand
Posts: 233
Eclipse IDE Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This answer may not exactly be what your expecting but I have done what you are trying to do using a different approach. The servlet put the name of the jasperreport and its paramaters in a table and thats all. A separate program running on a server polls the table and when it sees a request for a report it runs it. The table also holds the name of the print queue.

This has the advantage that the servlet is not burdened with the processing time it takes to generate a report and it's easier to debug the report on a foreground application
 
Amateurs built google. Professionals built the titanic. We can't find the guy that built this tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!