Win a copy of Grokking Bitcoin this week in the Cloud/Virtualization 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
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

Generate report in servlet using JasperReport  RSS feed

 
Ranch Hand
Posts: 103
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: 103
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: 103
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: 103
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: 242
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
 
It is no measure of health to be well adjusted to a profoundly sick society. -Krishnamurti Tiny ad:
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!