COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: stefan on 09 Feb 2006 07:31:57 AM

Title: Line Feed in calculated field
Post by: stefan on 09 Feb 2006 07:31:57 AM
Hello to all,

I'm new here and have a (hopefully) simple question:

In a calculated field, i have the following:
('Date Expired ' || chr(10) || '(' || to_char([Operational plan date];'dd.mm.yyyy') || ')'))

This results in (for example):

Date Expired
(02-12-2005)

However, when i open this query in Excel, the line feed (chr(10)) does not carry over resulting in:

Date Expired (02-12-2005)

Does anyone know if there is a way to fix this?

Thanks for you help!
Stefan.
Title: Re: Line Feed in calculated field
Post by: mikegreen on 11 Feb 2006 07:54:15 PM
Not sure why Excel doesnt take the LF.. But, have you thought about putting a table inside your list item (or whatever you are putting this calculation in) and making it 2 rows?
Title: Re: Line Feed in calculated field
Post by: CoginAustin on 11 Feb 2006 09:17:58 PM
I would try chr(13) instead (CR), or, CRLF. Also, you can put a table in that is 1 column, 2 rows, and place the text in side each cell as needed.
Title: Re: Line Feed in calculated field
Post by: stefan on 24 Feb 2006 04:40:43 AM
Thanks for the replies!

I tried chr(13) already, but didn't work. Also tried the other proposals (CR or CRLF) but i get an error when i validate.

I will try the table.

Thanks,
Stefan.