Jump to content

BIRT Developer Center Download


Photo
- - - - -

Make a new line from Concat aggregation?


  • Please log in to reply
1 reply to this topic

#1 SailRCG

SailRCG

    Junior Member

  • Members
  • PipPipPip
  • 65 posts

Posted 20 April 2017 - 02:48 PM

I am trying to create a new line for each " / " I encounter in an aggregated text string. Basically I have a computed column which puts:

 

Col Label 1      |         Col Label 2                   |    Col Label 3 

---------------------------------------------------------------------------

John                |    1PM - 4PM/8PM - 12AM    |     someStuff

---------------------------------------------------------------------------

Alex                 |     9AM - 5PM/                       |     otherStuff

--------------------------------------------------------------------------

Mary                |    10AM - 4PM/7PM - 9PM    |     herStuff

 

 

 

I want it to  look like:

Col Label 1      |         Col Label 2                   |    Col Label 3 

---------------------------------------------------------------------------

John                |    1PM - 4PM                         |     someStuff

                             8PM - 12AM    

---------------------------------------------------------------------------

Alex                 |     9AM - 5PM                        |     otherStuff

--------------------------------------------------------------------------

Mary                |    10AM - 4PM                       |     herStuff

 

                               7PM - 9PM    

 

I have tried adding <br>, /n, cr, \r\n.... etc... nothing seems to help... my concat is always a concat. 

 

Any ideas?   



#2 pricher

pricher

    Senior Member

  • Members
  • 738 posts

Posted 21 April 2017 - 09:09 AM

Hi,

 

You should be able to create a computed column like this one:

row["CUSTOMERNAME"] + "\n" + row["CITY"] + "\n" + row["COUNTRY"]

and use it in a data item to display data on multiple rows:

 

Attached File  2017-04-21 13_07_47-OS BIRT - VMware Workstation.png   6.99KB   0 downloads

 

Attached is a sample report,

 

P.

Attached Files


Pierre Richer

Solutions Consultant, Analytics & Reporting

OpenText