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 have researched the archives and found much interesting information on conditional drill-downs. I could not find answers to some questions about drilling on GRANDTOTAL values.
Example from Car:
TABLE FILE CAR SUM CNT.STANDARD ACROSS CAR BY COUNTRY WHERE CAR EQ 'AUDI' OR 'DATSUN' OR 'JAGUAR' OR 'JENSEN' ON TABLE SUMMARIZE ON TABLE SET STYLE * TYPE=GRANDTOTAL, COLUMN=N2, WHEN=N2 GT 2,FOCEXEC=dd(carname=CAR),$ TYPE=GRANDTOTAL, COLUMN=N3, WHEN=N3 GT 2,FOCEXEC=dd(carname=CAR),$ TYPE=GRANDTOTAL, COLUMN=N4, WHEN=N4 GT 2,FOCEXEC=dd(carname=CAR),$ TYPE=GRANDTOTAL, COLUMN=N5, WHEN=N5 GT 2,FOCEXEC=dd(carname=CAR),$ END
This creates the following output: ___________________________________________ CAR AUDI DATSUN JAGUAR JENSEN COUNTRY ENGLAND 0 0 5 4 JAPAN 0 2 0 0 W GERMANY 3 0 0 0 TOTAL 3 2 5 4 ___________________________________________
(The formatting controls do not show up, but only the number 3 in the TOTAL row is underlined.) Notice that only the Audi column shows an active drill-down. (I suspect the value being used in the WHEN expression is taken from the W GERMANY row and not the TOTAL row.)
Several questions.
1. How can I make the drill down conditional on the value in the TOTAL row? 2. I want to make the drill down active when the TOTAL value is GT 2 and LT 5. How can this be done given that the WHEN statement will not accept AND/OR? 3. Is there a way to do the conditional drill-down in #2 without reference to each column? (In other words, how can I handle the situation in which it is not known how many columns will be returned from the ACROSS action?)
Thanks in advance for the help.This message has been edited. Last edited by: Dennis Smid,
WebFOCUS 7.6.2 AIX Output: HTML, AHTML, Excel, and PDF
Posts: 18 | Location: Omaha, NE | Registered: November 04, 2007
TABLE FILE CAR
SUM CNT.STANDARD
ACROSS CAR
BY COUNTRY
WHERE CAR EQ 'AUDI' OR 'DATSUN' OR 'JAGUAR' OR 'JENSEN'
ON TABLE SUMMARIZE
ON TABLE SET STYLE *
TYPE=GRANDTOTAL, ACROSSCOLUMN=CNT.STANDARD, WHEN=N2 GT 2,FOCEXEC=DD(CARNAME=CAR),$
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
Your program has only TWO fields: COUNTRY (N1) and CNT.STANDARD (N2). What happens is that the styling for fields N3, N4 and N5 are ignored.
However, instead of using the N notation, you can use the C notation which identifies the COLUMNS in the output. As follows:
TABLE FILE CAR
SUM CNT.STANDARD
ACROSS CAR
BY COUNTRY
WHERE CAR EQ 'AUDI' OR 'DATSUN' OR 'JAGUAR' OR 'JENSEN'
ON TABLE SUMMARIZE
ON TABLE SET STYLE *
TYPE=GRANDTOTAL, COLUMN=C1, WHEN=C1 GT 2,FOCEXEC=dd(carname=CAR),$
TYPE=GRANDTOTAL, COLUMN=C2, WHEN=C2 GT 2,FOCEXEC=dd(carname=CAR),$
TYPE=GRANDTOTAL, COLUMN=C3, WHEN=C3 GT 2,FOCEXEC=dd(carname=CAR),$
TYPE=GRANDTOTAL, COLUMN=C4, WHEN=C4 GT 2,FOCEXEC=dd(carname=CAR),$
END
This should do the trick.
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006
To do a compound condition, you have to set a flag in a DEFINE or COMPUTE. In your case, you would have to use a COMPUTE at at grand total level so that you can test the value and set the flag. Then you can test the flag as a condition in your stylesheet.
DEFINE FILE CAR
DUM/A1=' ';
END
TABLE FILE CAR
SUM CNT.STANDARD
COMPUTE D/I5=IF CNT.STANDARD GT 2 AND CNT.STANDARD LT 5 THEN 1 ELSE 0; NOPRINT
ACROSS CAR
BY DUM NOPRINT
BY COUNTRY
WHERE CAR EQ 'AUDI' OR 'DATSUN' OR 'JAGUAR' OR 'JENSEN'
ON DUM SUMMARIZE
ON TABLE NOTOTAL
ON TABLE SET STYLE *
TYPE=SUBTOTAL, COLUMN=C1, WHEN=C2 EQ 1,FOCEXEC=dd(carname=CAR),$
TYPE=SUBTOTAL, COLUMN=C3, WHEN=C4 EQ 1,FOCEXEC=dd(carname=CAR),$
TYPE=SUBTOTAL, COLUMN=C5, WHEN=C6 EQ 1,FOCEXEC=dd(carname=CAR),$
TYPE=SUBTOTAL, COLUMN=C7, WHEN=C8 EQ 1,FOCEXEC=dd(carname=CAR),$
END
Or, using the Francis method:
TABLE FILE CAR
SUM CNT.STANDARD
COMPUTE D/I5=IF CNT.STANDARD GT 2 AND CNT.STANDARD LT 5 THEN 1 ELSE 0; NOPRINT
ACROSS CAR
BY COUNTRY
WHERE CAR EQ 'AUDI' OR 'DATSUN' OR 'JAGUAR' OR 'JENSEN'
ON TABLE SUMMARIZE
ON TABLE SET STYLE *
TYPE=GRANDTOTAL, ACROSSCOLUMN=CNT.STANDARD, WHEN=N3 EQ 1,FOCEXEC=DD(CARNAME=CAR),$
END
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006
I see how this works for an across report. However, I have not been able to figure out an equivalent approach for a straight table request using a print verb. (I have tried all manners of computes in a multiverb approach, but to no avail.) There must be another trick. See the following example which yields the same result as the matrix given earlier. How can I set the drill-down links in the GRANDTOTAL row to be active for total values greater than 2 and less then 5?
Dennis
TABLE FILE CAR SUM CNT.STANDARD ACROSS CAR BY COUNTRY WHERE CAR EQ 'AUDI' OR 'DATSUN' OR 'JAGUAR' OR 'JENSEN' ON TABLE HOLD END -* TABLE FILE HOLD PRINT E02 AS 'AUDI' E03 AS 'DATSUN' E04 AS 'JAGUAR' E05 AS 'JENSEN' BY COUNTRY ON TABLE SUMMARIZE ON TABLE SET STYLE * TYPE=GRANDTOTAL, ???????????, FOCEXEC=DD(CARNAME=CAR),$ END
WebFOCUS 7.6.2 AIX Output: HTML, AHTML, Excel, and PDF
Posts: 18 | Location: Omaha, NE | Registered: November 04, 2007