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.
I tried to use the st. on the subhead to get the subtotals before the details. I did not have luck since it's just printing the first record instead of the subtotal. Has anyone had luck in putting subtotals on the top instead of the bottom?
TABLE FILE CAR SUM DEALER_COST RETAIL_COST BY COUNTRY BY CAR
ON COUNTRY SUBHEAD "HEADING "" FOOTING "" ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * UNITS=IN, SQUEEZE=ON, ORIENTATION=PORTRAIT, $ TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=9, $ TYPE=TITLE, STYLE=BOLD, $ TYPE=TABHEADING, SIZE=12, STYLE=BOLD, $ TYPE=TABFOOTING, SIZE=12, STYLE=BOLD, $ TYPE=HEADING, SIZE=12, STYLE=BOLD, $ TYPE=FOOTING, SIZE=12, STYLE=BOLD, $ TYPE=SUBHEAD, SIZE=10, STYLE=BOLD, $ TYPE=SUBFOOT, SIZE=10, STYLE=BOLD, $ TYPE=SUBTOTAL, BACKCOLOR=RGB(210 210 210), $ TYPE=ACROSSVALUE, SIZE=9, $ TYPE=ACROSSTITLE, STYLE=BOLD, $ TYPE=GRANDTOTAL, BACKCOLOR=RGB(210 210 210), STYLE=BOLD, $ ENDSTYLE ENDThis message has been edited. Last edited by: Joel,
7.6.6 Windows 2003 Server, Sybase IQ, DB2, SQL Server and Oracle Databases Excel, HTML and PDF
DEFINE FILE CAR
X_COST/P13.2M = DEALER_COST;
Y_COST/P13.2M = RETAIL_COST;
END
TABLE FILE CAR
SUM
X_COST NOPRINT
Y_COST NOPRINT
BY COUNTRY AS ''
SUM
DEALER_COST/P13.2M AS ''
RETAIL_COST/P13.2M AS ''
BY COUNTRY AS '' PAGE-BREAK
BY CAR AS ''
ON COUNTRY SUBHEAD
"Country <+0> Car <+0> Dealer Cost <+0> Retail Cost"
" "
"<+0> <+0> <X_COST<Y_COST"
FOOTING
""
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=9,
$
TYPE=TITLE,
STYLE=BOLD,
$
TYPE=SUBHEAD,
STYLE=BOLD,
HEADALIGN=BODY,
JUSTIFY=LEFT,
$
TYPE=SUBHEAD,
BY=1,
LINE=3,
SIZE=10,
STYLE=BOLD,
JUSTIFY=RIGHT,
$
ENDSTYLE
END
-EXIT
I have an add-on question for the Subtotal on Top. I'd like to have an across value and put the subtotal and grand totals at the top. How do I do this?
TABLE FILE CAR
SUM
DEALER_COST
BY COUNTRY
BY CAR
ACROSS BODYTYPE
ON COUNTRY SUBTOTAL AS '*TOTAL'
ON TABLE SUMMARIZE CAR.BODY.DEALER_COST AS 'TOTAL'
END
This code shows the totals at the bottom and I'd like the totals to be on top.
Thanks for your help!
7.6.6 Windows 2003 Server, Sybase IQ, DB2, SQL Server and Oracle Databases Excel, HTML and PDF
I wonder if in future the new WebFOCUS 7.7 feature will in fact do what you want: Displaying Summary Lines Above the Data
The SET SUBTOTALS command controls whether summary lines are displayed above or below the detail lines in a report. The summary commands affected include SUBTOTAL, SUBTOTAL, RECOMPUTE, SUMMARIZE, COMPUTE, RECAP, and COLUMN-TOTAL.
SET SUBTOTALS {ABOVE|BELOW}
Posts: 195 | Location: Johannesburg, South Africa | Registered: September 13, 2008
APP PREPENDPATH IBISAMP
-RUN
SET ASNAMES = ON
DEFINE FILE CAR
COUNTRY/A30 = 'SUMMARY';
CAR/A16 = ' ';
CNTR/I2 = 0;
END
TABLE FILE CAR
SUM
DEALER_COST
FST.CNTR
BY COUNTRY
BY CAR
BY BODYTYPE
ON TABLE HOLD AS HOLD1
END
-RUN
DEFINE FILE CAR
XCOUNTRY/A30 = 'Total ' | COUNTRY;
CAR/A16 = ' ';
CNTR/I2 = IF COUNTRY EQ LAST COUNTRY THEN CNTR ELSE CNTR + 1;
END
TABLE FILE CAR
SUM
DEALER_COST
FST.CNTR
BY XCOUNTRY AS 'COUNTRY'
BY CAR
BY BODYTYPE
ON TABLE HOLD AS HOLD2
END
-RUN
DEFINE FILE CAR CLEAR
END
-RUN
DEFINE FILE CAR
COUNTRY/A30 = COUNTRY;
CNTR/I2 = IF COUNTRY EQ LAST COUNTRY THEN CNTR ELSE CNTR + 1;
END
TABLE FILE CAR
SUM
DEALER_COST
FST.CNTR
BY COUNTRY
BY CAR
BY BODYTYPE
ON TABLE HOLD AS HOLD3
END
-RUN
TABLE FILE HOLD1
PRINT
DEALER_COST
CNTR
BY COUNTRY
BY CAR
BY BODYTYPE
ON TABLE HOLD AS HOLD4
MORE
FILE HOLD2
MORE
FILE HOLD3
END
-RUN
DEFINE FILE HOLD4
KEY_SORT/I2 = IF COUNTRY EQ 'SUMMARY' THEN 1 ELSE
IF COUNTRY CONTAINS 'Total' THEN 2 ELSE 3;
END
TABLE FILE HOLD4
SUM
DEALER_COST
BY CNTR NOPRINT
BY KEY_SORT NOPRINT
BY COUNTRY
BY CAR
ACROSS BODYTYPE
ON TABLE NOTOTAL
END
-EXIT
Short Version:
quote:
SET SUBTOTALS {ABOVE|BELOW}
This is a GREAT enhancement in 7.7 - There are many, many others...