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

Cross Tabs

Status
Not open for further replies.

Montana751

Programmer
Aug 14, 2001
64
US
I have a cross Tab report for which I want to display the text field name of what the columns are summarizing.
What I want to add is indicated in the quotes below, the rest shows up already. (You'llneed to use your imagination on seeing my columns line up in this format.)
example
1/02 2/02
Group 1 "sum of count" 25 40
"average of count" 6.9 18.4
"# of Hours" 18 5
Group 2 "sum of count" 7 4
"average of count" 21.4 3.2
"# of Hours" 8 35
 
What are you building you Cross Tab against? Table? Stored Procedure? Access? SQL Server?

Essentially in a Cross Tab you taking a vertial column and displaying it horisontally. So for example:

Vertical Table Dates:
Date
----
1/02
2/02
1/02
1/02
2/02
2/02
2/02

So using a stored procedure you could say

select date, count(*) as iCount, "Sum Of Count" from Dates group by date

I believe you should get something like:

Date iCount no column name
---- ---- --------------
1/02 3 Sum Of Count
1/02 4 Sum Of Count


Someone correct me if I'm wrong here.




 
Opps, that's:

Date iCount no column name
---- ---- --------------
1/02 3 Sum Of Count
2/02 4 Sum Of Count
 
Create a formula like the following:

{original.field} + "sum of count" +
CHR(13) + "average of count" +
CHR(13) + "# of Hours"

And use this as your row field in the cross-tab. It will now create a 3 line label. You can experiment with alignment and spacing to make it look batter. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top