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!

SUBFOOT with ACROSS

Status
Not open for further replies.

kiddpete

MIS
Oct 9, 2003
788
US
I am trying to write a report like this:

TABLE FILE XYZ
SUM ALPHA
BY SEQ NOPRINT
BY ALPHA NOPRINT
SUM DOLLAR
ACROSS PERIOD AS '' ROW-TOTAL COLUMNS Q1 AND Q2 AND Q3
BY SEQ NOPRINT
ON SEQ SUBFOOT
" "
&quot;INT PLAN <SEQ><19><ST.C2><30><ST.C3>&quot;
&quot; &quot;
BY ALPHA NOPRINT
END

Where C2 is the value of DOLLAR for column Q1.

When I run this, Focus says it doesn't know what C2 and C3 are. When I remove the 'ST.', the report works for C2, but C3 is random characters.

How do I get the subtotal? How do I get DOLLARs for Q2 and Q3?
 
The problem is, you can't use a ST. prefix on a 'column notation'. What you can do is use RECAP (which will use subtotal values) to 'name' the 'C' values, then reference the RECAP in the SUBFOOT. Here's an example from the CAR file:
Code:
TABLE FILE CAR 
SUM CAR            
BY COUNTRY NOPRINT  
BY CAR NOPRINT     
SUM SEATS       
ACROSS BODY AS '' ROW-TOTAL COLUMNS SEDAN AND COUPE AND HARDTOP  
BY COUNTRY NOPRINT        
ON COUNTRY RECAP       
STC2/I3=C2;        
STC3/I3=C3;                          
ON COUNTRY SUBFOOT                 
&quot; &quot;   
&quot;INT PLAN <CAR><19><STC2><30><STC3>&quot;  
&quot; &quot;                                
BY CAR NOPRINT                       
END

My reference to C2 and C3 in the RECAP is the subtotal of those columns at the COUNTRY level.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top