Verketten Sie mehrere Zeilen Daten in eine einzige Zelle in einem WEBI-Bericht

Brauche Beratung für ein webi-Bericht in BO 4.1 Traurig über die Ausrichtung.

Habe ich einen Bericht wie folgt:

Country | Agent     |Customer   |Products                       
UK      | Mo        |Sara       |Bag                            
UK      | Adam      |Jill       |Bag 
UK      | Tim       |Kim        |Shoes                          
UK      | Tim       |Kim        |Bag                            
US      | John      |Sam        |Belt                           
US      | John      |Sam        |Bag    

Sollte das Ergebnis so Aussehen:

Country | Agent     |Customer   |Products                       
UK      | Mo        |Sara       |Bag                            
UK      | Adam      |Jill       |Bag                            
UK      | Tim       |Kim        |Shoes,Bag                      
US      | John      |Sam        |Belt, Bag                      

Habe ich 1 Abfrage ziehen, dass Kunden, Produkte und Land und eine andere Abfrage, zieht Agent und Land. Habe ich gemacht-Agent als meine detail-Objekt im Zusammenhang mit Land. Ich bekomme folgende Ausgabe

Country | Agent     |Customer   |Products                       
UK      | Mo        |Sara       |Bag                            
UK      | Adam      |Jill       |Bag                            
UK      | Tim       |Kim        |Shoes                          
UK      | Tim       |Kim        |Bag                            
US      | John      |Sam        |Belt                           
US      | John      |Sam        |Bag                            

Ich habe versucht, Folgen den Anweisungen von
http://bi.srivatsakr.com/2011/08/converting-rows-into-single-cell-comma.html

[VAR Max Products] = Max ([Products] In [Customer])

[VAR Concat Products] = [Products]+”, “+Previous(Self)

[VAR Max Concat Products]= [VAR Concat Products] Where ([Products]=[VAR Max Products])

[VAR Product] = If(IsNull(Previous([VAR Max Concat Products]));Substr([VAR Max Concat Products];1;Length([VAR Max Concat Products])-2);Substr([VAR Max Concat Products];1;Pos([VAR Max Concat Products];Previous([VAR Max Concat Products]))-3))

Aber, dass mir Ergebnisse wie

Country | Agent | Customer  |Products   |[VAR Product]                      
UK      | Mo    |Sara       |Bag        |Bag                            
UK      | Adam  |Jill       |Bag        |                           
UK      | Tim   |Kim        |Shoes,     |Bag, Shoes                         
UK      | Tim   |Kim        |Bag        |                           
US      | John  |Sam        |Belt       |Bag, Belt                      
US      | John  |Sam        |Bag        |                           

Wenn ich entfernen Sie die Product-Spalte, das Ergebnis ist wie folgt;

Country | Agent     | Customer  |[VAR Product]                      
UK      | Mo        |Sara       |Bag                            
UK      | Adam      |Jill       |                           
UK      | Tim       |Kim        |                           
UK      | Tim       |Kim        |                           
US      | John      |Sam        |                           
US      | John      |Sam        |                           

Kann ich ausblenden der Spalte Produkt, aber es wird noch nicht das richtige Ergebnis.
Brauche ein paar Ratschläge. Dankbar für die Hilfe im Voraus.

InformationsquelleAutor Aaron | 2015-10-07

Schreibe einen Kommentar