• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Jasper report taking long time to generate a report

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi

i am facing problem with jasper report..............when more than one user access jasper report at sametime then its slow.........its slow while filling.....i am using DB2 database, websphere and jasper Xml template to generate a report ............please kindly help me what should be set to avoid this problem :
 
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there and welcome to Javaranch!

You need to really find out where the slowness is occurring. Are you able to put some basic timing stats around each part of your application? E.g. The SQL execution on the DB, the report generation, the report display....
 
sandhya sampath
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Martijn Verburg wrote:Hi there and welcome to Javaranch!

You need to really find out where the slowness is occurring. Are you able to put some basic timing stats around each part of your application? E.g. The SQL execution on the DB, the report generation, the report display....




hi

problem is with report generation.............means its taking too long time to while filling the data when 2 users access the report simultaneously
 
Martijn Verburg
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are the users asking for an identical report? E.g. Are they providing the same inputs?
 
sandhya sampath
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Martijn Verburg wrote:Are the users asking for an identical report? E.g. Are they providing the same inputs?



yes...........when 2 users access the same report at same time its taking long time to fill the data...... exactly i mean to generate the report
 
Martijn Verburg
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK, have you thought about only generating the report _once_ and then displaying a copy to each user?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You still haven't answered Martijn's original question, though: where is the time being spent? If it's in the execution of DB queries, then some query tuning (and/or DB index tuning) might help.
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello! I'm new here. I use this post to post mine, that's could have the same title.

I'm using JasperReport 3.1.4 with iReport 3.1.4. on a computer: intel pentium 4, 2GHz, 512 MB ram. jdk-1.5.0.17 , ojdbd14.jar is the driver to connect to oracle db.

The problem is that it's too slow. it take 3 seconds to compile (ok), but 2,5 minutes to filling the report and then the exporting to xls crashes.

There's no problem with simple sql query as input (select * from .....where...) but when the query is a little bit difficult like (select ...from UNION select...from...) it crashes.

Do you have any suggestion?
 
Martijn Verburg
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi mar co,

Can you please change your screen name in accordance with our Naming Policy, thanks
 
Martijn Verburg
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As for your problem, it sounds like it is the Database query that is slow. You'll need to tune those queries!
 
Marco All
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Martijn, sorry for the name, now is correct ;)

what do you mean with "tune the query"?

if I execute the same sql directly in a db, it goes really fast. (I mean, in the iReport, I connect to a Database in the services tab, and then I Execute a SQL command)
 
Martijn Verburg
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ah OK< so the compile of the report is fast, the DB query is fast, but the generation of the report is slow. Is there lots of data? I'm afraid I'm not a Jasper Reports user, so my help is probably going to be limited from here on in...
 
Marco All
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's 50'000 row... do you think that a so named powerful program written in Java doesn't support these amount of data? Or maybe it is my pc that isn't powerful enough?
 
Martijn Verburg
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
50,000 rows is a lot to process! I'm not overly surprised that the report takes some time to generate. I'm also curious about the error you get when exporting to XLS, what error message does it give? Out of memory? Old versions XLS can only take 32K rows, so if you're exporting to an older version that might be a problem as well.

What is the spec of your PC/server?
 
Marco All
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Intel pentium 4, 2GHz, 512 MB ram. Do you need more?

I've any message because java.exe crashes! Only once I've had the report (18MB) after 10 minutes. I'm exporting with JExcelApi to a excel 2003 (no problem to view that).

I used to use BusinessObject to do reports, and it hasn't problem to do that. Do you think that it's better to change direction (change software)? because all the report that I've to build are really huge...
 
Martijn Verburg
author
Posts: 3285
13
Mac OS X Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you definitely need more RAM, 512MB isn't really going to cut it. I suspect the JVM is running out of memory when performing the export. I'd recommend trying to have a minimum of 2GB on RAM on a development machine if doing this sort of work with Java, recommended 4GB of RAM.
 
Marco All
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Last news, it takes 2,5 minutes to fill the report and 8 minutes to export in xsl. the message that it appears at the end is "No external viewer specified for this type of print. Set it in the options frame!" But it has done the report (that it takes up to 3 minutes to open!!! it's 18MB)

Yes, I'll try with more RAM!

Thank you Martijn for the help, I really appreciate it. It's not easy to have information and support about jasperReports around internet...
 
Greenhorn
Posts: 1
Netbeans IDE Tomcat Server Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi every one.... I am developing a restaurant management system.
I want to generate a receipt and print it . I ue jasperReports 4.0.0 and IReport 4.0.0 for this purpose with netbeans.
I want to generate that receipt using certaing conditiond i.e KOT no. ,. In design Preview of IReport it diaplay correctly all record according to provided kot no. but when i run it using my java application ,each record is displayed 3 times and the borders that i have designed at IReport wizard do not come in the report generated . Please help me . It's Urgent.
Thanks in advance...
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi I am working with jasper report 4.1.1. In my case I have more than 50000 records in my table and for each record the jasper report is compiling again and again. So it will take much more time to generate the complete report. Is there any another thing in which we can compile the template once and just put the values again and again?

Thanks in Advance... Your reply will be appreciated
 
Creativity is allowing yourself to make mistakes; art is knowing which ones to keep. Keep this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic