Jump to content
Changes to the Jaspersoft community edition download ×

possible to generate Monthly Lable?


steven.cyc

Recommended Posts

Hi guys,

    I need your help from iReport, I need to generate a monthly figure from iReport,
suppose I have a date inputted:  2012-08-20

then I need to generate the 12 month label starting from the date inputted ( e.g.   08/2012,  09/2012, 10/2012, 11/2012, 12/2012 , 01/2013, 02/2013.......)

    Do you think iReport support to do this by Variable?

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Steven,

If you have a date parameter you can use that parameter in variables to generate the dates you need using either java.util.Date or java.util.Calendar, check this blog post that has a really cool example similar to what you need. http://type-exit.org/adventures-with-open-source-bi/2010/06/date-calculation-in-ireport/

Since you need to generate 12 variables for this, the other option may be using report scriptlets check chapter 18 of the iReport Ultimate guide http://community.jaspersoft.com/documentation?version=6263 for more information on using Scriptlets

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