Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crosstab Column Header Customisation

Status
Not open for further replies.

PSKriegeR

Programmer
Apr 10, 2001
4
0
0
GB
I am currently creating a crosstab report in Crystal Reports version 7. There is nothing special about the report itself, (apart from the fact it is my first crosstab report), but I am having some trouble with the column headings on the report.

The database format for the report is as follows:

[tt]DATE - Date value (left hand side)
CATEGORY - Category string (column headings)
CATEGORYURN - Category URN (unique column number)
VALUE - Summarized data[/tt]

The report itself has dates down the left hand side, and alphanumeric 'categories' across the top. At the moment my report looks like this...

[tt] Cat1 Cat10 Cat11 Cat2 Cat20
Date 1 34 34 345 345 345
Date 2 433 435 3455 232 33[/tt]

As you can see the problem with the report is that the alphanumeric columns have been alpha-sorted which puts them out of sync with the actual data. From the database structure, you can see that each heading carries a URN which denotes the order in which the headings should appear. If I use the URN at the heading, I just get...

[tt] 1 2 3 4 5
Date 1 34 345 34 345 345
Date 2 433 232 435 3455 33[/tt]

In this case, the data is in the correct sequence, but the headers are simply numbers, but I need the category strings.

Can anyone offer any help on this?

Thanks in advance.
 
In the Cross-Tab Expert, Add the CATEGORYURN to the Columns, then while the field is highlighted, click the Group Options button below it. The Cross-Tab Group Options window appears. On the options tab check the Customize Group Name, and select the CATEGORY filed.

This should sort the columns by URN, but display the CATEGORY values.
 
Unfortunately because I am using Crystal Reports 7, the options tab you speak of does not seem to exist in the cross-tab expert dialog. I have a tab called "Cross-Tab", and I only get another tab if I select the "Group Options..." button, and select "In Specified Order" from the drop down box. This gives me a "Specified Order" tab, but it does not seem to fit the description of the tab you have described.

Thanks anyway, but I don't think this applies to Crystal 7! [sad]
 
Perhaps the easiest solution would be to concatenate the two fields:

totext({table.categoryurn},"00") + " " + {table.category}

Use this as the column field. Add as many zeros as the maximum number of places in the category unique number so that it sorts correctly.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top