Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Previous Month(Previous Month in Dinamic Text)  () 1 Vote
Previous Month [message #501267] Tue, 01 December 2009 17:23 Go to next message
Michele Mising name is currently offline Michele Mising nameFriend
Messages: 25
Registered: September 2009
Junior Member
Hi.
My report contains a Dinamic Text which displays the Month of the Year and the Year, ex: "December 2009"

At the moment it displays the Current month - using the following expression:
BirtDateTime.month(BirtDateTime.today(),2)+" "+BirtDateTime.year(BirtDateTime.today())

Since this report is run the first day of the month, I have to change my expression to display the Previous month, ex: "November 2009".

Note that in January should display "December 2009" - but if that's too complex I can manually adjust my report once Rolling Eyes .

Thanks.
Michele
Re: Previous Month [message #501290 is a reply to message #501267] Tue, 01 December 2009 18:37 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Michele,

Try
BirtDateTime.month(BirtDateTime.addMonth(BirtDateTime.today( ),-1),2)+ " "+
BirtDateTime.year(BirtDateTime.addMonth(BirtDateTime.today() ,-1))

Jason

Michele wrote:
> Hi.
> My report contains a Dinamic Text which displays the Month of the Year
> and the Year, ex: "December 2009"
>
> At the moment it displays the Current month - using the following
> expression:
> BirtDateTime.month(BirtDateTime.today(),2)+"
> "+BirtDateTime.year(BirtDateTime.today())
>
> Since this report is run the first day of the month, I have to change my
> expression to display the Previous month, ex: "November 2009".
>
> Note that in January should display "December 2009" - but if that's too
> complex I can manually adjust my report once :roll: .
>
> Thanks.
> Michele
icon7.gif  Re: Previous Month [message #501420 is a reply to message #501290] Wed, 02 December 2009 09:47 Go to previous message
Michele Mising name is currently offline Michele Mising nameFriend
Messages: 25
Registered: September 2009
Junior Member
Hi Jason.
It works!!

Thanks.
Michele
Previous Topic:PDF emitter using wrong font
Next Topic:.VTS - version info and conversion to .XLS
Goto Forum:
  


Current Time: Fri Apr 19 02:25:22 GMT 2024

Powered by FUDForum. Page generated in 0.01702 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top