cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports Crosstab column values

0 Kudos

I have a Crosstab Report that has about 55 rows and 7 columns .The column values are like 121..127, 61...67 and so on; meaning it is a sequence of 7 numbers and in random order. Is there a way to change the column names to Site 1, Site2..Site7 using some formula? I added an additional report header section and created labels with text as Site 1..site 7 and suppressed the column values to see if that would solve my problem. However, the problem now is the labels Do not repeat on every vertical page. How do I get to solve this?

Any suggestion in this regard would be of great help. Thanks in advance.crosstab-column-header.jpg

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Malini,

Right-click one of the cells of the Crosstab's column > Format Field > Common tab > Click the formula button beside 'Display String' and use this code:

"Restoration Site " & Totext(CurrentColumnIndex,'#')

If the numbering starts at zero, change the code to:

"Restoration Site " & Totext(CurrentColumnIndex+1,'#')

-Abhilash

0 Kudos

Thanks so much Abhilash!! This just worked great.

Answers (1)

Answers (1)

DellSC
Active Contributor
0 Kudos

How do you know from the data which site it is?

Instead of creating new labels outside of the crosstab, try this:

1. Select the column header in the crosstab. Right-click on it and select "Column Options" and then "Group Options".

2. Go to the Options tab and see whether it will let you customize the Group Name. If it will, use the formula button to specify what the column header is for each group.

3. If it won't let you customize, then you'll need to create a formula that will let you specify what the name is for each group. Use this formula as the column in the crosstab instead of the field that you're currently using.

-Dell

0 Kudos

Thank you for your response. The solution Abhilash provided just worked fine.

Malini