Jump to content
We've recently updated our Privacy Statement, available here ×

Stopping report generation


Recommended Posts

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

 

Hi,

 

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

anyway.

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,

Teodor

 

 

 

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

Link to comment
Share on other sites

  • 5 years later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

 

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?

 

Thanks,

Chinnu

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...