It's all about the answers!

Ask a question

Group_concat - how to make a Carriage return as separator?


Janet Cook (23110) | asked Jan 09, 6:01 p.m.

 In Reporting I can use Grouo_Concat to bring the data together into a single Cell in the output.  Its easy to separate it by comma or such - how can I get it to separate the data by a carriage return?

Eg for An enumerated data output I want it to report ( within a single Excel Cell) as

Open
Closed

Rather than as 
Open, Closed
 I tired Control M and Hex code for Carriage return - neither worked.

Thanks in advance
Janet

Accepted answer


permanent link
Davyd Norris (2.5k217) | answered Jan 09, 6:57 p.m.
The problem here is that straight characters like "," translate to all display formats but new lines doesn't.

If you were outputting the report to a text format then I would try "\r\n" as the separator characters.

If you are outputting to the screen where the output is HTML then I would try "<br>", but it's possible that the parser will remove this raw HTML for security reasons

Janet Cook selected this answer as the correct answer

Comments
Janet Cook commented Jan 09, 7:27 p.m. | edited Jan 10, 5:11 a.m.

 Thankyou Davyd

The \r\n worked - we are exporting it to an Excel file.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.