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!

Cross Tab

Status
Not open for further replies.

iansmithwolves

Technical User
Jan 24, 2003
53
0
0
GB
CR 8.5

Is it possible to get the main row headings central, both vertically and horizontally in a cross tab, ie so that they appear in the centre of the first column, which is appended to several rows in subsequent columns.
 
To get the horizontal centering, click on the row label and use the centering icon. To get vertical centering, one way is to go into the crosstab expert, click on the row field->group options->customize group name->use a formula to customize name->x+2 and enter:

replicatestring(chr(13),2) + totext({table.number},"0000")

...where you would replace the "2" with the number of returns you would like. If your row field is a number, format it something like I did to reflect the maximum number of digits, so that it sorts correctly. Otherwise, if it's a string, remove the totext(,"0000"). This isn't actual vertical centering, but gives you a tool to play with alignment anyway.

-LB
 
Thanks, this was a great tip. Do you know how we could do this with the summarized fields and the totals?

Thanks again!
 
Well, I suppose you could add the summary in multiple times and then in preview suppress the top and bottom values in the summary and totals sections to get vertical centering.

-LB
 
Hmmmm,
The way your mind works is amazing.
I'll give that a try.

Thanks
 
LB

I've tried the formula, my headings disappeared, what am I doing wrong?
 
LB

Just out of interest what does the 13 in the formula represent?
 
chr(13) is a return. They "disappeared" because the values are now hidden below the bottom margin of the cell. Click on the row label and drag it down to make it taller--then you will see the value.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top