Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » How to display week number?
How to display week number? [message #262750] Wed, 05 December 2007 16:48 Go to next message
Rob Scott is currently offline Rob ScottFriend
Messages: 524
Registered: July 2009
Senior Member
Anyone got a trick for how to display the week number of the current week?
Or the week number given a date?
This seems to be missing from the functions available in the BIRT report
tool. Also Javascript doesn't seem to have such a function.

Also how can I check if a certain date from a dataset is in the past or
the future?
Re: How to display week number? [message #262771 is a reply to message #262750] Wed, 05 December 2007 18:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Rob,

Try
importPackage(Packages.java.util);
cl = new GregorianCalendar();
cl.get(Calendar.WEEK_OF_MONTH);

Jason

Rob Scott wrote:
> Anyone got a trick for how to display the week number of the current week?
> Or the week number given a date?
> This seems to be missing from the functions available in the BIRT report
> tool. Also Javascript doesn't seem to have such a function.
>
> Also how can I check if a certain date from a dataset is in the past or
> the future?
>
Re: How to display week number? [message #262829 is a reply to message #262771] Thu, 06 December 2007 14:49 Go to previous messageGo to next message
Rob Scott is currently offline Rob ScottFriend
Messages: 524
Registered: July 2009
Senior Member
Jason,

Where would I put this code?
I want to show the current week number in the header of a report template.

Rob
Re: How to display week number? [message #262837 is a reply to message #262829] Thu, 06 December 2007 15:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Rob,

Add a data element to the header and copy the code in.

Jason

Rob Scott wrote:
> Jason,
>
> Where would I put this code?
> I want to show the current week number in the header of a report template.
>
> Rob
Re: How to display week number? [message #262884 is a reply to message #262837] Fri, 07 December 2007 10:55 Go to previous message
Rob Scott is currently offline Rob ScottFriend
Messages: 524
Registered: July 2009
Senior Member
Thanks!

That was close to what I wanted.
Modify it to "Calendar.WEEK_OF_YEAR" and it is perfect.
Previous Topic:Can the Parameter Group Display Name Be Localized?
Next Topic:birt line height in PDF ignored
Goto Forum:
  


Current Time: Wed Jan 15 10:56:48 GMT 2025

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

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

Back to the top