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

Cross-Tab Assistance

Status
Not open for further replies.

rynosims

Technical User
Nov 14, 2001
12
US
Hello, it's me again! I am now trying to create a Cross-Tab that can add several bits of date. I need to ad the total number of aircraft for a particular airfrafe. That is no problem. Now, I need to add the total number of 4 rows in the same cross-tab. It would look something like this:

C130 C9 C21 C20
FMC 5 3 1 5
PMCM 2 6 1 0
PMCS 0 2 3 1
PMCB 1 0 1 0
MC 8 11 6 6
NMCM 1 2 0 0
NMCS 0 0 0 0
NMCB 2 1 1 1
TOTAL 11 14 7 7
The MC will be the total of the 4 rows above. But, I already have a total at the bottom, as I need to add all the aircraft together to get a total available. Can this be done, or do I need to make 2 tables, one with the above info, and a second with the remaining info?

A second question, how can I make the cross-tab show the NMCS row when there are all 0's? CR 8 automatically suppreses the entire row.

Thanks!!!
 
What you need to do is create a 2-layer Crosstab.
Create a formula field called SET:

if (airfare] startswith [ "P","F"]
then "MC"
else "Other"

Now make SET your first "row" field in the cross-tab, and make AIRFARE your second "row" field. It will give you airfare lines, 2 SET totals and then the grand total.

Also, CR doesn't suppress the row, it just doesn't create it. Crystal only knows to create rows when it finds a record to include in the cross-tab. If you have a master table of Airfares you might be able to link from that to the other tables using Left-Outer joins (as long as you don't put selection criteria on the other tables). Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top