Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Adding Text to Group field(Conatinating text and date)
Adding Text to Group field [message #629628] Wed, 29 September 2010 02:31 Go to next message
Chris  is currently offline Chris Friend
Messages: 47
Registered: September 2010
Member
Hi I have grouped the data for my report by date, which works.
datatype is Date
expression is dataSetRow["transdate"]
However I now wish to have the group show
Date: 02/01/2010.

I changed he datatype to String and
the data expression to
"Date: " + toString(dataSetRow["transdate"])

This does not work. Could anyone help please.

Thanks
Chris
Re: Adding Text to Group field [message #629630 is a reply to message #629628] Wed, 29 September 2010 03:33 Go to previous messageGo to next message
Richard A. Polunsky is currently offline Richard A. PolunskyFriend
Messages: 212
Registered: July 2009
Location: Houston TX
Senior Member

There's probably a way to ode for this using a SimpleDateFormat call - I've seen string to date discussed so the reverse should be possible. I generally just code for this in the underlying SQL for simplicity. You can't use ToString because there's no single correct way to convert a date (or date-time) type to string.

This might be a good item for a BIRT reporting tips and tricks FAQ. If I get another stretch of time where I'm not terribly billable, I'll see what I can add.
Re: Adding Text to Group field [message #629636 is a reply to message #629628] Wed, 29 September 2010 04:19 Go to previous messageGo to next message
Chris  is currently offline Chris Friend
Messages: 47
Registered: September 2010
Member
Got it to work, just removed the tostring
"Date: " + dataSetRow["transdate"]

Re: Adding Text to Group field [message #629637 is a reply to message #629630] Wed, 29 September 2010 04:21 Go to previous message
Chris  is currently offline Chris Friend
Messages: 47
Registered: September 2010
Member
Thanks Richard
Previous Topic:BIRT in eclipse without design IDE
Next Topic:Different icons for folders in CN
Goto Forum:
  


Current Time: Fri Apr 26 10:12:22 GMT 2024

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

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

Back to the top