Jump to content

[SOLVED] Measuring run time of each subreport


taborda

Recommended Posts

Hi,

 

I have a report that is divided in more than 40 sub reports, i need a way of finding out how much time each of the subreport is taking to run.

 

Is there any native way to discover this time with jasper reports? or do i need to implement some method?..

 

any clue or advice any of you can give me?

 

thanks in advance,

João Taborda

Post edited by: taborda, at: 2008/04/08 09:51

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

hi taborda

 

 

Look into the samples provided in the jasperreports build. There are plenty of samples which can demonstrate you how to calculate the taken to fill and print a report. In the same way you can calculate the time taken to compile the report/subreport.

 

 

DNV Srikanth

Link to comment
Share on other sites

thanks for the reply...

 

but maybe i didn't explain correctly, i need the time to fill each subreport not the master report, that one i already have but i need to now which section (sub-report) is taking longer...

 

all the master and sub reports are pre-compiled using iReport and i don't care how long they take to compile, just need the filling/print time...

 

thanks anyway, and i will look to the examples again..

 

hope i made my self clear now :)

if someone can help, thanks in advance,

João Taborda

Link to comment
Share on other sites

:D

 

thanks Lucian, i think that's exactly what i need... now i have two more question about this subject

 

first one is a legal one:

I'm using jasperreport as a tool to generate reports in a commercial program... i know jasperreport have a peculiar license about changing code for commercial use... is this considered changing?.. i think not, since is just "extending" a class...

 

can someone confirm it?

 

second one:

i still need to understand how to make jasper call my new JRSubreportRunner implementation instead of the default one (don't bother to answer if this is really a stupid question, i still didn't look for it and i think it will be easy to find the answer :D

 

thanks very much,

hope someone can enlight me about the "legal" question,

João Taborda

Link to comment
Share on other sites

I'm not a lawyer either, but extending a JasperReports class is not considered changing the JR code if you ask me. Btw, JR doesn't have a "peculiar" license; it's LGPL which is a "standard" license used by numerous open source products.

 

Regarding your second question, you will need to write an implementation of net.sf.jasperreports.engine.fill.JRSubreportRunnerFactory that produces instances of your (extended) class, and configure JR to use your factory by putting the following line in jasperreports.properties (which should be placed on your application's classpath):

Code:

net.sf.jasperreports.subreport.runner.factory=<your factory class name>

 

Regards,

Lucian

Link to comment
Share on other sites

Thanks again for this answer :)...

 

i checked the license (before i had just believe what someone told me about it) and if i don't change the JR library (jar) then it's not illegal to use it in a commercial product..

 

i will now try to implement this class to register times of filling of diferent reports and will let you know out it worked :).. thanks for the tips about how to start this...

 

best regards, keep the good work :)

João Taborda

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...