As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
Is there a way to split a subtotal into 2 seperate parts based on a subvalue, Lets say department A has to sub sections a and b... i would like to split into those two sections but the total for the department as a whole would remain the same
Ex.
Department_____Class_____Sales A______________1_________250.00 A______________1_________100.00 Subtotal of 1 percent of department 35%
A______________2_________50.00 A______________2_________25.00 A______________2_________25.00 Subtotal of 2 percent of department 10%
A______________3_________150.00 A______________3_________50.00 A______________3_________50.00 Subtotal of 3 percent of department 20%
A______________4_________100.00 A______________4_________200.00 Subtotal of 4 percent of department 30%
-* -------------------------------------------------------------------------------------
-* Create MASTER / DATA files
-* -------------------------------------------------------------------------------------
APP FI HLDFILE DISK hldfile.mas
-RUN
-WRITE HLDFILE SEGMENT=HLDFILE, SEGTYPE=S0, $
-WRITE HLDFILE FIELDNAME=DEP ,E01 ,A5 ,ACTUAL=A5 ,$
-WRITE HLDFILE FIELDNAME=CLASS ,E02 ,A1 ,ACTUAL=A1 ,$
-WRITE HLDFILE FIELDNAME=SALES ,E03 ,I9C ,ACTUAL=A9 ,$
APP FI HLDFILE DISK hldfile.ftm
-RUN
-WRITE HLDFILE DepA 1 250
-WRITE HLDFILE DepA 1 100
-WRITE HLDFILE DepA 2 50
-WRITE HLDFILE DepA 2 25
-WRITE HLDFILE DepA 2 25
-WRITE HLDFILE DepA 3 150
-WRITE HLDFILE DepA 3 50
-WRITE HLDFILE DepA 3 50
-WRITE HLDFILE DepA 4 100
-WRITE HLDFILE DepA 4 200
-WRITE HLDFILE DepB 1 100
-WRITE HLDFILE DepB 1 50
-* -------------------------------------------------------------------------------------
TABLE FILE HLDFILE
SUM
SALES NOPRINT
BY DEP
PRINT
SALES AS 'Sales'
COMPUTE PCT2/D8.2% = (SALES/C1) * 100; NOPRINT
BY DEP AS 'Department' COLUMN-TOTAL
BY CLASS AS 'Class' SUBTOTAL AS 'Subtotal of '
ON CLASS SUBFOOT
"Percent of Department: <ST.PCT2 "
" "
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOPAGE
ON TABLE NOTOTAL
ON TABLE SET BYDISPLAY ON
ON TABLE SET STYLE *
TYPE=REPORT ,UNITS=PTS ,FONT='VERDANA', SIZE=8 ,$
TYPE=REPORT ,BORDER=1 ,BORDER-COLOR=RGB(210 210 210) ,$
TYPE=TITLE ,STYLE=BOLD ,BACKCOLOR=RGB(230 230 230) ,$
TYPE=SUBFOOT ,STYLE=BOLD ,line=1 ,$
TYPE=SUBTOTAL ,STYLE=BOLD ,BACKCOLOR=RGB(210 210 210) ,$
TYPE=DATA ,TOPGAP=2 ,BOTTOMGAP=2 ,$
TYPE=DATA ,BACKCOLOR=(RGB(255 255 255) RGB(245 245 245)),$
ENDSTYLE
END
... or ...
TABLE FILE HLDFILE
SUM
SALES NOPRINT
BY DEP
PRINT
SALES AS 'Sales'
COMPUTE ST_SALES/I9C = SALES; NOPRINT
COMPUTE PCT2/D8.2% = (SALES/C1) * 100; NOPRINT
BY DEP AS 'Department'
BY CLASS AS 'Class' PAGE-BREAK
ON CLASS SUBFOOT
"Subtotal <0> <0><ST.ST_SALES "
"Percent of Department:<+0> <+0><ST.PCT2 "
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOPAGE
ON TABLE NOTOTAL
ON TABLE SET BYDISPLAY ON
ON TABLE SET STYLE *
TYPE=REPORT ,UNITS=PTS ,FONT='VERDANA', SIZE=8 ,$
TYPE=REPORT ,BORDER=0 ,BORDER-COLOR=RGB(210 210 210) ,$
TYPE=TITLE ,STYLE=BOLD ,BORDER-TOP=2, BORDER-BOTTOM=1,
BACKCOLOR=RGB(230 230 230) ,$
TYPE=SUBFOOT ,HEADALIGN=BODY ,$
TYPE=SUBFOOT ,STYLE=BOLD+ITALIC ,BORDER-TOP=0 ,BORDER-RIGHT=0 ,$
TYPE=SUBFOOT ,OBJECT=FIELD ,STYLE=BOLD, JUSTIFY=RIGHT ,$
TYPE=DATA ,COLUMN=CLASS ,JUSTIFY=CENTER ,$
TYPE=DATA ,TOPGAP=2 ,BOTTOMGAP=2 ,$
ENDSTYLE
END
This message has been edited. Last edited by: <FreSte>,
I was trying to look at this code and find out where department A was split into 2 subsections lowercase a and b. Where in the code was department A split into 2 subsections a and b?
After re-reading the question, I see what you mean; I missed the lowercase one's in my example. Can you expand the dataset above with what you mean and the expected output ?
Department_____Class_____Sales A______________1_________250.00 A______________1_________100.00 Subtotal of 1 percent of department 35% part of subdepartment a
A______________2_________50.00 A______________2_________25.00 A______________2_________25.00 Subtotal of 2 percent of department 10% part of subdepartment b
A______________3_________150.00 A______________3_________50.00 A______________3_________50.00 Subtotal of 3 percent of department 20% part of subdepartment a
A______________4_________100.00 A______________4_________200.00 Subtotal of 4 percent of department 30% part of subdepartment a
Maybe it cannot be done in 1 run, but it will help if you could expand the above mentioned data structure on how the subdepartments fit in. Are the subdepartments making the totals for each Department/Class ??
To explain to better, its the department called candy-tabbacco and what i would like to do is instead of totaling it all in one, i would like to split it and total the tabacco and the candy seperate at the end of the department candy-tabacco
subdepartment = t for tabacco subdepartment = c for candy