Repeating the first colums of a cross-tab for each value in the second column

Friday 8 May 2020 @ 11:44 pm

This is better illustrated with pictures. Recently a customer had a Cross-tab that looked like the image on the left below. But they wanted the first column to repeat next to each value in the second column, like the image on the right below.

cross-tab without repeating the first column

I found a relatively simple way to do this:

  1. I created a formula the combined the two column fields into one string, with a dash between them.
  2. I went into the Cross-tab expert and clicked the “Group Options” button for the first column field. I changed it to the new formula.
  3. I then clicked the”Options” tab and checked the option “Customize Group Name Field”.
  4. I used the drop down to select the database field that was the original field used for the first column, then clicked OK.
  5. I went to the the last tab in the Cross-tab expert named “Customize Style” and highlighted the concatenated formula in the “Rows” box.
  6. I checked the option “Suppress Subtotal” (if not already checked) and clicked OK.

The cross-tab then looked like the one on the right.









Leave a Reply

Jeff-Net
Recrystallize Pro

Crystal Reports Server