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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crosstab Row and Column Headers

Status
Not open for further replies.

Leighton21

Technical User
Dec 17, 2001
83
AU
Hi all,

I have a crosstab which currently outputs the following

Winter
Value1 Value2
01/01/2008 Site1 12 1
Site2 14 22
01/02/2008 Site1 33 33
Site2 45 33

where the row groups are date and then site and the column groups are Season then Value. Is there a simpl way to be able to repeat the row and column group labels so in execl it would be


Winter Winter
Date Site Value1 Value2
01/01/2008 Site1 12 1
01/01/2008 Site2 14 22
01/02/2008 Site1 33 33
01/02/2008 Site2 45 33

i.e. The row and column headers are printed each time rather than on a change and also the DB labels for the groups are displayed (i.e. Date and Site)

Cheers
 
Write a formula to concatenate the date and site fields:

totext({YourDateField})&" "&{Site}

Use this as your row value.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
Cheers dgillz,

wont this mean that the when the data is transferred to excel that the date and site will not be in their own cell??
 
I suppose so, but why transfer it to Excel?

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
Unfortunately the client wants the data in excel, I would have coded this in excel however the requirement specified is to use crystal (part of the clients particular software that must spawn this report) and then export to excel for further processing

cheers
 
If you don't mind the column order, you could add the date field as row#1, the site field as row#2, and the date field again as row#3. The Row#3 dates will then be repeated, and will be available in separate cells. I'm guessing the issue is that the user wants to sort on these columns, and they can't when the values aren't repeated. You can then suppress row#1, so that it won't appear upon export.

-LB
 
Regarding the row labels, you have two options. One is to add a text box above the rows. If you need this to appear on subsequent pages, you would need to place the crosstab in the report footer, and then place the text box in a page header section that is formatted to "underlay following sections". Add a border to the text box if you wish.

The other option is to create a formula like this:

whilereadingrecords;
"Customer - Date"

And add this as your first row field. This will print as the left most column. You can rotate and center the text if you wish.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top