Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Adding Text to Group field(Conatinating text and date)
Adding Text to Group field [message #629628] Tue, 28 September 2010 22:31 Go to next message
Chris  is currently offline Chris
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] Tue, 28 September 2010 23:33 Go to previous messageGo to next message
Richard A. Polunsky is currently offline Richard A. Polunsky
Messages: 198
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 00:19 Go to previous messageGo to next message
Chris  is currently offline Chris
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 00:21 Go to previous message
Chris  is currently offline Chris
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: Tue Sep 02 05:30:43 EDT 2014

Powered by FUDForum. Page generated in 0.01884 seconds