Fomatting issue

Hi guys,

     I have report which looks like this:

name | id | desc
abc 1 x
abc 1 y
abc 1 z
cde 2 w
cde 2 t

I want it as:
name | id | desc
abc 1 x,y,z
cde 2 w,t

Is this even possible.please let me know.

Thanks and appreciate ur time
gopi


bluebox (BOB member since 2004-05-28)

This has been asked about a hundred times.

The answer is “not really”.

But, you can look at these for help:


Steve Krandel :us: (BOB member since 2002-06-25)

You could apply a break, remove duplicates, and center across rows. This would give something similar but going down instead of on the same row.


Randy Jones :us: (BOB member since 2002-08-19)

Using your data as an example:
(it’s quite a long way of doing it)

Step by step

Create a table using
*(I am going on the assumption that they are all character / dimension objects)

Place a break on and on
3.
Create a new variable: using the formula:
=CountAll( In Body) In ( , )

Create a second variable: <1> using:
=Previous()+","+

Create a third variable: <2> using:
=Previous(Previous()) +"," +Previous() +"," +

Next create another variable: using:
= If = 1 Then Else If = 2 Then <1> Else <2>

In the Break footer use the formula:
=Max(If <> Previous() Then ""Else )

  1. Now you can simply fold the table to display the ,
    and all the corresponding values.

Or alternatively to avoid creating a load of local variables use the formula:

=Max(If <> Previous() Then ““Else (If (CountAll( In Body) In ( , ))= 1 Then Else If (CountAll( In Body) In ( , ))= 2 Then (Previous()+”,”+ ) Else (Previous(Previous()) +"," +Previous() +"," + )))


Reporter Bloke :uk: (BOB member since 2004-05-20)

Hmm it may need some modification to ensure that’s dynamic,


Reporter Bloke :uk: (BOB member since 2004-05-20)