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'm having problems getting the "BY" column header to appear on the same line as the "ACROSS" column header values. I need them on the same line so that I my customers can use Auto Filter and sort in Excel.
My code:
TABLE FILE SF86REVIEW2
SUM
ROWTOT AS 'ROWTOT'
BY CLR_ACR_ID AS 'CLR/ACR #'
ACROSS SF86REVIEW2.REJECTER AS ''
WHERE SF86REVIEW2.DAYSRJCT LE 10
ON TABLE PCHOLD FORMAT EXL2K OPEN
END
If you really need to get the column titles in one row, you could use a McGyver technique, though the code isn't pretty:
-SET &ECHO = 'ALL';
SET ASNAMES=ON
SET HOLDFORMAT=ALPHA
SET HOLDLIST=PRINTONLY
SET PAGE=NOLEAD
-RUN
TABLE FILE CAR
SUM SALES
BY COUNTRY
ACROSS SEATS AS ''
ON TABLE HOLD AS H001
END
-RUN
?FF H001
-RUN
-*-- Create a hold file containing the column names and other attributes of the hold file
CHECK FILE H001 HOLD
-RUN
-*-- Create a hold file containing only the column names generated by the across statement
TABLE FILE HOLD
PRINT FIELDNAME
WHERE FIELDNAME NE 'COUNTRY'
ON TABLE HOLD AS H002
END
-RUN
-*-- Create the report
TABLE FILE H001
PRINT
COUNTRY
-*-- Read the across column name
-READ H002 &FIELDNAME.A66.
-REPEAT END_REP1 WHILE &IORETURN EQ 0;
-*-- Extract the across column value
-SET &FIELDVALUE = SUBSTR(66, &FIELDNAME, 4, 5, 1, 'A1');
-*-- display the across column name and value
&FIELDNAME AS '&FIELDVALUE'
-READ H002 &FIELDNAME.A66.
-END_REP1
END
-RUN
?FF shows what the across column names evaluate to, (in my example SAL1, SAL2, etc) this information is used in the SUBSTR function which extracts the value of the ACROSS field.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
TABLE FILE CAR
SUM
SALES AS 'ROWTOT'
BY COUNTRY AS 'CLR/ACR #'
ACROSS SEATS AS ''
-*ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
TYPE=TITLE, STYLE=BOLD, $
TYPE=ACROSSVALUE, STYLE=BOLD, $
ENDSTYLE
END
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
The best way to achieve what you want for filtering is by using a template/macro to move the BY title up 1 row and then delete the blank row that is left.
You can then turn on the auto filtering at the same time.
TABLE FILE SF86REVIEW2
SUM
ROWTOT AS ''
BY CLR_ACR_ID
ACROSS SF86REVIEW2.REJECTER
ACROSS-TOTAL AS 'TOTAL'
WHERE SF86REVIEW2.DAYSRJCT LE 60
ON TABLE SET ASNAMES ON
ON TABLE HOLD
END
TABLE FILE HOLD
PRINT *
ON TABLE SET STYLE *
ORIENTATION=LANDSCAPE,$
TYPE=TITLE, COLOR=NAVY, STYLE=BOLD+UNDERLINE, FONT=ARIAL, SIZE=10,$
TYPE=ACROSSVALUE, COLOR=NAVY, STYLE=BOLD+UNDERLINE, FONT=ARIAL, SIZE=10,$
ENDSTYLE
ON TABLE PCHOLD FORMAT EXL2K
END
This gave me all of the column headers on the same row, with the same formatting.