September 22, 2006, 11:55 AM
Bethanysubtotal formats not working on across fields
I'm trying to add some formatting to certain columns in a subtotal. I also have an across field and the formatting is only working for the first set of columns for the across field. I think it is because the style sheet is referencing column=N14 and not the name of the column so when the that column is displayed again for the 2nd across, it doesn't do the formatting on the 2nd set. How do you change the style sheet to reference the column name specifically and not the N14 position?
WF 7.1.4
September 22, 2006, 12:03 PM
N.SelphYou want to use:
TYPE=REPORT, ACROSSCOLUMN=N1, etc, $
September 22, 2006, 12:21 PM
BethanyThis is the style sheet part that is causing the problem, I think.
TYPE=SUBTOTAL,
BY=1,
COLUMN=N14,
BORDER-TOP=MEDIUM,
BORDER-BOTTOM=OFF,
BORDER-LEFT=OFF,
BORDER-RIGHT=OFF,
$
How can I specifically name N14 as BUDGET so that all BUDGET columns (due to the across field) have the same subtotal formatting?
September 22, 2006, 04:15 PM
susannahTYPE=SUBTOTAL,ACROSSCOLUMN=BUDGET,COLOR=RED,$
should work fine.
i don't know what the BY=1 would have been for, but nuke it.
and nuke the COLUMN=N14 reference.
September 22, 2006, 04:58 PM
Bethanywill that work? budget isn't my across field. here's what i've got:
..................fy 2006.............fy 2007
account.......budget..expense.....bugdet.expense
1123..........10000.....2000.......5000...4000
1223...........5000........0.......6000....100
1456..........10000......750........500....100
.............._____....._____
subtotal......25000.....2750......11500...4200
FY is the across field and I'm summing budget and expense by account. The formatting I'm trying to add to the subtotal is the top border and it's not displaying on the subtotals on FY 2007 data.
I've also tried to put in column name in the style sheet so I had COLUMN=Budget instead of N14 (which is the format I saw in the WF documentation), but when I ran the report there was no change to the output and when I went back to the code, the style sheet was changed back to COLUMN=N14. No idea why???
September 25, 2006, 09:13 AM
Tony ABethany,
If you want to reference multiple occurences of a field, then instead of having to repeat the stylesheet row for each value (COLUMN=N14 .... COLUMN=N17 etc.) then just reference the COLUMN name and suffix with an asterisk -
SET PAGE-NUM = NOPAGE
TABLE FILE CAR
SUM RCOST
ACROSS COUNTRY
BY CAR AS ''
BY MODEL AS ''
ON CAR SUBTOTAL AS 'Sub Total for '
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=SUBTOTAL, COLUMN=RCOST(*), BORDER-TOP=MEDIUM, BORDER-BOTTOM=OFF,
BORDER-LEFT=OFF, BORDER-RIGHT=OFF, $
ENDSTYLE
END
-RUN
T
October 12, 2006, 11:21 AM
BethanyThanks for the tip. I tried the code that you supplied and it worked just as expected. When I modified the stylesheet in my report, it still doesn't work. It seems to be recognizing the repeated columns, but it isn't putting the borders as specified. Is it possible that something earlier in my stylesheet is causing this?
October 12, 2006, 11:47 AM
Tony ABethany,
Comment out all the seperate style sheet parts that could affect your SUBTOTAL styling and reintroduce one at a time. Hopefully that will help you identify which part is causing the problem.
Alternatively post your style sheet and we'll see what we can spot (if anything).
T
October 12, 2006, 04:53 PM
BethanyOkay, so here is the CAR table sample that works as expected.
SET GMISSVAL = 0.00
DEFINE FILE CAR
SPACE/A1 = ' ';
END
SET PAGE-NUM = NOPAGE
TABLE FILE CAR
SUM RCOST AS RETCOST SPACE AS ' ' DEALER_COST AS DEALCOST SPACE AS ' ' SALES
ACROSS COUNTRY AS CNTRY
BY CAR
BY BODYTYPE
BY MODEL
ON CAR SUBTOTAL
RCOST
DEALER_COST
SALES AS '*TOTAL'
ON TABLE SUBHEAD
" "
HEADING
"CAR REPORT"
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=SUBTOTAL, COLUMN=RCOST(*), BORDER-TOP=MEDIUM, BORDER-BOTTOM=OFF,
BORDER-LEFT=OFF, BORDER-RIGHT=OFF, $
TYPE=SUBTOTAL, COLUMN=DEALER_COST(*), BORDER-TOP=MEDIUM, BORDER-BOTTOM=OFF,
BORDER-LEFT=OFF, BORDER-RIGHT=OFF, $
ENDSTYLE
END
And here is my report. I've removed all other styling from the report and just kept the parts for the subtotals, but I still don't get the same subtotal borders as the CAR table sample code.
SET GMISSVAL = 0.00
SET PAGE-NUM = NOPAGE
TABLE FILE HAU
SUM
APPRO/D10.2CB AS 'Budget'
SPACE AS ''
PRIOR_EXP/D10.2CB AS 'Prior,Expenses'
SPACE AS ''
CY_EXP/D10.2CB AS 'Current,Expenses'
SPACE AS ''
TOTAL_EXP/D10.2CB AS 'Total,Expenses'
SPACE AS ''
AVAILABLE/D10.2CB AS 'Available'
BY AU_TYPE NOPRINT
BY ACCT_UNIT AS 'AU #'
BY DESCRIPT AS 'Description'
BY PI AS 'PI'
BY GA AS 'GA'
BY ACTIVE_STATUS AS 'A/I'
BY SDATE AS 'Start,Date'
BY EDATE AS 'End,Date'
BY AU_CLOSED AS 'Closed'
BY DEPT AS 'Dept'
BY PRIMARY AS 'PC'
BY SECONDARY AS 'SC'
BY FA_FUNC AS 'FC'
ACROSS ACCOUNT AS ''
ON AU_TYPE SUBTOTAL
APPRO
PRIOR_EXP
CY_EXP
TOTAL_EXP
AVAILABLE AS '*TOTAL'
ON TABLE SUBHEAD
" "
HEADING
"Loyola University Chicago"
"Subcontract "
"Summary Report"
"For Period &BPD to &EPD, FY &FY"
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=SUBTOTAL, COLUMN=APPRO(*), BORDER-TOP=MEDIUM, BORDER-BOTTOM=OFF,
BORDER-LEFT=OFF, BORDER-RIGHT=OFF, $
TYPE=SUBTOTAL, COLUMN=PRIOR_EXP(*), BORDER-TOP=MEDIUM, BORDER-BOTTOM=OFF,
BORDER-LEFT=OFF, BORDER-RIGHT=OFF, $
ENDSTYLE
END
-RUN
Thanks for checking it out.