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

Jasper Report closing query executer while report isn't finished yet


faizan.munir88

Recommended Posts

Situation:

There was a need to change Grouping option on report, where changing Group Expression on Header wasn't enough (Due to complex query/ Data Modeled in DB). So I've created a newer version of an existing report. Differnce is that previous version had a SubReport and in newer version I had to copy everything into MainReport from SubReport, Variables, TextFields, everything. Also updated query to include fields that were being loaded in SubReport's query.

Problem:

One by one I added each Variable in to MainReport. So technically it should work, and it does until I added final Variable in the report and it fails the report. This Variable's Expression does nothing different and calls simple method in ClassPath for calculating values. If I just keep the variable expression empty report works.

So my first thougts were it has to do something with this method call, as there are few other variables calling diff methods in the same class and values returned successfully.

Debug

Started digging in and noticed that the method is being called and returning values correctly. But for some odd reason JasperReport closes query executer whilst data from last Group is still being processed.

Below I added screen shots of End of the Debug Log and i've highlighted when the final page is being processed for both failure and success.

At line 26 it's failing as query executer gets closed in the middle of printing the final Group, where as if I remove the Variable expression it completes processing FINAL GROUP then SUMMARY BAND and PAGE FOOTER.

I can't get why report rendering is getting effected due to a variable value. Im using default setting for Execution Time and Reset Value for all Variables and there associated Textfields

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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