SAP Knowledge Base Article - Public

1543960 - How to combine a set of data in multiple rows to show into one row in Crystal Reports

Symptom

  • I have 2 columns
    • Game        Player
      Basketball   A
      Soccer         B
      Hockey        C
      Soccer         D
      Basketball   E
      Soccer         F
  • Need to display these records in 3 text boxes in group footer which would display as
    • Basketball A, E
    • Soccer B, D,F
    • Hockey C and so on.

Environment

  • Crystal Reports 2008

Resolution

  1. Create a group game.
  2. Create a string manual running total.
  3. Put formula 1 in the Details section.
    1. whileprintingrecords;
      stringvar teams:= teams + {yourteamfield} + ", ";
  4. Put formula 2 in the team group header
    1. whileprintingrecords;
      stringvar teams:= "";
  5. Put formula 3 in your group footer
    1. whileprintingrecords;
      stringvar teams;
      numbervar tl:= length(teams) - 2;
      if tl > 0 then teams1 to tl;

Keywords

Formula, String running total , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , How To

Product

Crystal Reports 2008 V1