Is it possible to update a field as part of a report?

0

I am thinking specifically of two cases:

  • A flag (boolean field) that is set when a row is printed
  • A sequence number that is auto-incremented when a row is printed

Hoping someone has done this etc.

Thanks in advance, even if the answer is an unequivocal "no."

andrew_50's picture
Joined: Jan 25 2018 - 8:33am
Last seen: 20 hours 17 min ago

3 Answers:

0

You'll have to do it outside JasperReports or modify JasperReports library to do that.

hozawa's picture
62697
Joined: Apr 24 2010 - 4:31pm
Last seen: 11 months 4 weeks ago
0

Not really, the report is only executing the main query and subdataser queries, it doesn't communicate with the database afterwards.

Friendly User's picture
Joined: Oct 8 2009 - 5:59am
Last seen: 15 hours 42 min ago
1

You could use an own scriptlet class to update your field(s) within the database after it's printed

For e.g. when your field is placed in a common detail band you could implement afterDetailEval.

see here or also here

hth + regards

C-Box

C-Box's picture
2322
Joined: Jul 19 2006 - 5:58pm
Last seen: 1 month 4 weeks ago
Feedback
randomness