Jump to content
Changes to the Jaspersoft community edition download ×

storing datetime of last report


Recommended Posts



I am hoping that someone can offer some advice on a task I have set myself.


I am trying to work out a way to automatically store the date and time of a reports generation in a simple table. Each subsequent report will of course have a later date and time.


However I am struggling to find a way to do this automatically within ireport.


Any advice would be appreciated.


Many Thanks


Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic



Managed to work this one out myself.


Probably the best way seems to be using ireport's built in Java scriptlet utility.

Simply select the scriptlet editor and create a method in the resultant automatic class.

Your method will create a connection object and statement object which will facilitate communication with a database.

The method should also create a new 'Date' object which will be formatted and stored in a very simple table, to be retrieved whenever needed.

A call to the method can be placed in one of the events that the scriptlet class supports....that way the date/time will be placed in the table automatically every time a new report is generated.




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