Stopping report generation

By: Maciej Kaminski - maciejka
Stopping report generation
2002-11-06 05:41
Hi Teodor,
I would like to be able to interrupt report generation.
Would You consider checking current Thread isInterrupted() flag in report generating loop?

By: Teodor Danciu - teodord
RE: Stopping report generation
2002-11-07 13:00


I have made a little modification so that with
every iteration in the data source, a call to
Thread.currentThread().isInterrupted() is made.

Check the CVS repository if you want to test it.
It might be exactly what you need.

Note that this only breaks the iteration through
the data set and the report will get generated
But it might not contain all the records.

This would be a way to stop the repor after
a certain number of records have been generated.

Thank you,

By: Maciej Kaminski - maciejka
RE: Stopping report generation
2002-11-14 07:49
What about filling and exporting stages?

Both could be time consuming and should be interuptable.

Other thing is Jasper behavior while interrupted. Acceptting isInterrupted() and finnishing quietly leads to difficult to trace errors. Interrupted and normal termination distinction should be supported by syntax, by having methods throw exception when interrupted
2001 JI Open Discussion's picture
Joined: Aug 10 2006 - 3:26am
Last seen: 16 years 9 months ago

1 Answer:


hi all,


i have the same scenario of stopping the report generation in the middle if the report generation is taking too much of a time based on my data,

is there a way to stop the generation once the export has kick started ?

i mean once the method exporter.exportReport(); is called ?


I have seen some code like Thread.isInterrupted in the Exporter classes in the Jasper reports Source ,but i  am unable to stop the exporting in the middle .


Any help in this regard?




chinnu9999's picture
Joined: Oct 7 2011 - 2:40am
Last seen: 10 years 1 month ago