2016-04-15 11 views
0

Ist es möglich, diese Art von Layout mit diesem Datensatz in Jaspis zu erhalten und wie geht das?Mehrere Band in einer einzigen Zeile in Jasper

color_table

id | color_group | description 
1 | primary  | the first 
2 | secondary | the second 
3 | tertiary | the third 

color_table_details

color_table_id | color 
1    | red 
1    | blue 
1    | yellow 
2    | orange 
2    | violet 
2    | green 
3    | etc 

Welche Layout i unten wollen.

id  color group  description   color 
1   primary   the first   red 
               blue 
               yellow 
2   secondary   the second   orange 
               violet 
               green 

Antwort

1

ich gelöst, dass mit folgenden Lösung:

1. Added report group to the report 
2. Added new variable with type of string (var_name) 
3. On the variable expression property of the variable, 
    $V{var_name} == null || ${var_name} == "" 
    ? "1" 
    : ${var_name} + ", 1" 
4. Set the reset type of your variable to **Report** and its reset group to the report group you created at step 1 
5. Then on your report layout, edit the text field expression of your id, color group and description to the following 
    $V{var_name} == "1" 
    ? ${field_name} 
    : "" 
+0

woah ich diese Lösung nicht gedacht hätte funktionieren würde. Danke vielmals. :) –

Verwandte Themen