Focal Point
SUBTOTAL FORMATTING

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4711088331

July 21, 2005, 10:18 AM
Syed
SUBTOTAL FORMATTING
Hi,
I am trying to use Recompute on certain fields. Now I want to align the subtotals with certain columns which I want. Output is being generated in PDF. I am working on WF(5.3.3).
Eg.
SUM

COMPUTE X1 AS 'X1'
COMPUTE X2 AS 'X2'
COMPUTE X3 AS 'X3'

BY
FIELD1
BY
FIELD2
BY
FIELD3
BY
FIELD4

ON FIELD3 RECOMPUTE AS 'TOTAL'
ON FIELD1 RECOMPUTE AS 'TOTAL'

Now I want to align the 1st subtotal with Field3 Column and 2nd subtotal with Field1 Column. Something like the output below.


FIELD1..FIELD2...FIELD3....FIELD4..X1..X2..X3
B1..........War......A1........B2
...............................FL
...............................RG
...............................SE
.....................Total A1

.....................A2........PT
...............................FL
...............................RG
...............................SE
.....................Total A2

Total B1........................

Please help!!

With my approach, after doing recompute on specific fields, the subtotals are left aligned and the desired output is not fetched.
July 21, 2005, 12:36 PM
Tony A
Use the style -

TYPE=SUBTOTAL, JUSTIFY=RIGHT, BY=FIELD3, $

That would give you what you want although not in PDF format.
July 21, 2005, 04:20 PM
reFOCUSing
I did this in WF 7.1.0 so
I gave you two different ways to do the same
thing. I think this is want your
trying to do:
-SET &EXAMPLE = 1; -*-SET 
&EXAMPLE = 2;
TABLE FILE CAR SUM COMPUTE X1/I10 = 
RETAIL_COST - 10000; COMPUTE X2/I10 = DEALER_COST - 20000;
 BY  COUNTRY BY CAR< BY 
BODYTYPE<br />ON BODYTYPE SUBFOOT <+0>TOTAL<+0><ST.X1<+0><ST.X2"
ON COUNTRY SUBFOOT<br />"TOTAL<+0><ST.X1<+0><ST.X2" " 
"ON TABLE NOTOTAL ON TABLE PCHOLD 
FORMAT PDF
ON TABLE SET STYLE * 
UNITS=IN,PAGESIZE='Letter',
LEFTMARGIN=0.25,
RIGHTMARGIN=0.25,TOPMARGIN=0.25,
BOTTOMMARGIN=0.00,SQUEEZE=ON,
ORIENTATION=LANDSCAPE,$<br TYPE=REPORT,FONT='ARIAL',SIZE=8,
COLOR='BLACK',BACKCOLOR='NONE',STYLE=NORMAL,
RIGHTGAP=0.00,LEFTGAP=0.00,$
TYPE=REPORT,COLUMN=P1,SQUEEZE=1.00,$
TYPE=REPORT,COLUMN=P2,SQUEEZE=1.00,$
TYPE=REPORT,COLUMN=P3,SQUEEZE=1.00,
TYPE=REPORT,COLUMN=P4,SQUEEZE=0.75,$
TYPE=REPORT,COLUMN=P5,SQUEEZE=0.75,$
-GOTO :EX_&EXAMPLE-:EX_1
TYPE=SUBFOOT,BY=1,ITEM=1,POSITION=P1,
JUSTIFY=LEFT,TYPE=SUBFOOT,BY=1,ITEM=2,
POSITION=P2,JUSTIFY=RIGHT,$
TYPE=SUBFOOT,BY=1,ITEM=3,POSITION=P3,
JUSTIFY=RIGHT,$TYPE=SUBFOOT,BY=3,ITEM=2,
POSITION=P3,JUSTIFY=LEFT,$ TYPE=SUBFOOT,BY=3,ITEM=3,POSITION=P4,
JUSTIFY=RIGHT,$
TYPE=SUBFOOT,BY=3,ITEM=4,POSITION=P5,
JUSTIFY=RIGHT,$
GOTO :EX_END-:EX_2<br TYPE=SUBFOOT,BY=1,ITEM=1,WIDTH=1.00,
JUSTIFY=LEFT,$
TYPE=SUBFOOT,BY=1,ITEM=2,WIDTH=1.00,
JUSTIFY=RIGHT,$
TYPE=SUBFOOT,BY=1,ITEM=3,WIDTH=1.00,
JUSTIFY=RIGHT,$
TYPE=SUBFOOT,BY=3,ITEM=1,WIDTH=2.00,
JUSTIFY=LEFT,$
TYPE=SUBFOOT,BY=3,ITEM=2,WIDTH=1.00,
JUSTIFY=LEFT,$<br />TYPE=SUBFOOT,BY=3,ITEM=3,WIDTH=0.75,
JUSTIFY=RIGHT,$
TYPE=SUBFOOT,BY=3,ITEM=4,WIDTH=0.75,
JUSTIFY=RIGHT,$
:EX_END
ENDSTYLE<br />END

This message has been edited. Last edited by: <Mabel>,
July 22, 2005, 05:39 AM
Syed
Hi,
The trick of POSITION=<> with SUBFOOT worked fine. But is the same possible incase of RECOMPUTE also? Since I am using RECOMPUTE option to find the sum of percentages, hence the formatting is required for the same.
Please guide!!!
July 25, 2005, 04:23 AM
Syed
My last query about recompute is still unresolved. Please guide and I am not able to proceed without this.

Regards,
Syed
July 25, 2005, 02:03 PM
Noreen Redden
You can specify the aligning fields in a SUBHEAD, SUBFOOD, HEADING, FOOTING. However, not in a RECOMPUTE. Instead of the RECOMPUTE, do RECAPs, and then specify a SUBFOOT.

If you need a response quickly, it might be faster for you to call Customer Support at IBI, 1-800-736-6130, or join INFORESPONSE ONLY at techsupport.ibi.com, where you can open cases with Customer Support.
July 26, 2005, 06:34 AM
<Ricky>
Thanks Noreen for the guidance. I am able to achieve the alignment along with the percentage calculation as desired.
I had spent a lot of time trying with the RECOMPUTE option. I think i should have tried a different approach as this one.
Thanks again!