Focal Point Banner


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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
ACROSS question
 Login/Join
 
Expert
posted
Hello,

Shown below is a demo program to help illustrate what I'm trying to achieve (I apologise for the lengthy FEX). The FEX should run on any WebFOCUS installation.

I would like to report on a year's worth of data By Quarter Across Month.

To achieve the ACROSS, I defined a field called Month-In-Quarter which I do not want to show on the report - hence the NOPRINT. I would like to show the Actual Month instead. The Attached FEX does not show the Month. How would I do this, hopefully without having to use FRL.

Thanks in advance.

Francis.

SET NODATA=0
-RUN
DEFINE FILE CENTFIN
MTH_IN_QTR/I1 = 
IF MONTH IN (1, 4, 7, 10) THEN 1 ELSE
IF MONTH IN (2, 5, 8, 11) THEN 2 ELSE
IF MONTH IN (3, 6, 9, 12) THEN 3;
ITEMX/A20 = SUBSTR(20, ITEM, 2, 20, 19, 'A20');
END
-RUN
TABLE FILE CENTFIN
SUM VALUE
BY ITYPE NOPRINT PAGE-BREAK
BY QUARTER NOPRINT
ACROSS MTH_IN_QTR NOPRINT AND ROW-TOTAL
BY ITEMX
ROWS 'Product'
OVER 'Interest'
OVER 'Inventory'
ON ITYPE SUBTOTAL AS 'Total Type'
ON QUARTER SUBTOTAL AS 'Total'
WHERE YEAR EQ 2000
HEADING
" "
"Type: <ITYPE"

ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLESHEET *
TYPE=REPORT, GRID=OFF, FONT='VERDANA', SIZE=8, $
TYPE = REPORT, COLUMN=ROWTOTAL, STYLE=BOLD, COLOR=BLUE, $
TYPE=HEADING, STYLE=BOLD, $
TYPE=SUBTOTAL, STYLE=BOLD, COLOR=BLUE, $
TYPE=ACROSSTITLE, STYLE=BOLD, COLOR=NAVY, JUSTIFY=CENTER, $
TYPE=ACROSSVALUE, STYLE=BOLD, COLOR=NAVY, JUSTIFY=CENTER, $
TYPE=GRANDTOTAL, STYLE=BOLD, $
ENDSTYLE<br />END

This message has been edited. Last edited by: <Mabel>,
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Guru
posted Hide Post
Francis, just add another ACROSS showing the month name, like this:

ACROSS MTH_IN_QTR NOPRINT
ACROSS MTH_NAME AS ''
 
Posts: 319 | Location: Stockholm, Sweden | Registered: February 04, 2004Report This Post
Expert
posted Hide Post
Unfortunately, what that does is to show all 12 months on the same row, what I need is only the three months for each quarter on the same row.
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Now, I'm getting somewhere, using the WHEN clause with the SUBHEAD statement.

SET NODATA=0
-RUN

DEFINE FILE CENTFIN
MTH_IN_QTR/I1 =
IF MONTH IN (1, 4, 7, 10) THEN 1 ELSE
IF MONTH IN (2, 5, 8, 11) THEN 2 ELSE
IF MONTH IN (3, 6, 9, 12) THEN 3;
ITEMX/A20 = SUBSTR(20, ITEM, 2, 20, 19, 'A20');
END
-RUN

TABLE FILE CENTFIN
SUM VALUE
BY ITYPE NOPRINT PAGE-BREAK
BY QUARTER NOPRINT
ACROSS MTH_IN_QTR NOPRINT
AND ROW-TOTAL
BY ITEMX
ROWS 'Product'
OVER 'Equipment'
OVER 'Benefits'
OVER 'Interest'
OVER 'Inventory'
ON ITYPE SUBTOTAL AS 'Total'
ON QUARTER SUBTOTAL AS 'Total'

ON QUARTER SUBHEAD
" <+0> Jan <+0> Feb <+0> Mar <+0> Total Q1"
WHEN QUARTER EQ 'Q1'

ON QUARTER SUBHEAD
" <+0> Apr <+0> May <+0> Jun <+0> Total Q2"
WHEN QUARTER EQ 'Q2'

ON QUARTER SUBHEAD
" <+0> Jul <+0> Aug <+0> Sep <+0> Total Q3"
WHEN QUARTER EQ 'Q3'

ON QUARTER SUBHEAD
" <+0> Oct <+0> Nov <+0> Dec <+0> Total Q4"
WHEN QUARTER EQ 'Q4'

WHERE YEAR EQ 2000

HEADING
" "
"Type: <ITYPE"
" "
ON TABLE NOTOTAL
ON TABLE SET PAGE NOLEAD
ON TABLE SET HTMLCSS ON

ON TABLE SET STYLESHEET *
TYPE = REPORT, BORDER=1, BORDER-COLOR=SILVER, FONT='ARIAL', SIZE=8, $
TYPE = REPORT, COLUMN=ROWTOTAL, STYLE=BOLD, COLOR=BLUE, $
TYPE=HEADING, STYLE=BOLD, $
TYPE=SUBTOTAL, STYLE=BOLD, COLOR=BLUE, $
TYPE=GRANDTOTAL, STYLE=BOLD, $
TYPE=SUBHEAD, HEADALIGN=BODY, STYLE=BOLD, JUSTIFY=RIGHT, $
TYPE=SUBHEAD, ITEM=5, COLOR=BLUE, $
ENDSTYLE
END

July 17, 2007 - Cleaned up code.

This message has been edited. Last edited by: Francis Mariani,
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders