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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [Sharing] Recursive Drill-Down

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Sharing] Recursive Drill-Down
 Login/Join
 
Virtuoso
posted
One of my customers had the following request which I will state using the CAR file.

A report shows SALES BY COUNTRY:


When clicking on COUNTRY a new report is to be shown in the same window showing SALES BY COUNTRY BY CAR but only display the CARs for the clicked COUNTRY:


This is the solution I came up with:
  
-* File recursive.fex

-DEFAULTH &COUNTRY=' ';
-SET &XCAR=IF &COUNTRY EQ ' ' THEN '' ELSE 'CAR';

DEFINE FILE CAR
 XCAR/A16=IF COUNTRY EQ '&COUNTRY' THEN CAR ELSE ' ';
END

TABLE FILE CAR
SUM CAR.BODY.SALES
BY CAR.ORIGIN.COUNTRY
BY XCAR AS '&XCAR'
ON TABLE PCHOLD FORMAT HTML
ON TABLE NOTOTAL
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET SQUEEZE ON
ON TABLE SET EMPTYREPORT ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
 INCLUDE=endeflt,$
TYPE=DATA, COLUMN=N1, TARGET='_self', FOCEXEC=recursive(COUNTRY=CAR.ORIGIN.COUNTRY), $
ENDSTYLE
END

This message has been edited. Last edited by: Danny-SRL,


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, 2006Report This Post
Master
posted Hide Post
I don't know if there is a question in your post...

But here's another one:
DEFINE FILE CAR
	XCAR/A16 = IF COUNTRY EQ &COUNTRY THEN CAR ELSE '';
END

TABLE FILE CAR
	SUM	SALES
	BY	COUNTRY
	BY	XCAR
ON TABLE PCHOLD FORMAT HTML
END


...and another one...

TABLE FILE CAR
	SUM	SALES
	BY	COUNTRY
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS H_COUNTRY
END

TABLE FILE CAR
	SUM	SALES
	BY	COUNTRY
	BY	CAR
WHERE COUNTRY EQ &COUNTRY
ON TABLE SET ASNAMES ON
ON TABLE HOLD AS H_CAR
END

MATCH FILE H_COUNTRY
	SUM	SALES AS 'CNTRY_SALES'
	BY	COUNTRY
RUN
FILE H_CAR
	SUM	ALL.SALES AS 'CAR_SALES'
	BY	COUNTRY
	BY	CAR
ON TABLE HOLD AS X OLD-OR-NEW
END

TABLE FILE X
	SUM COMPUTE SALES/D20 = IF FST.COUNTRY EQ &COUNTRY THEN CAR_SALES ELSE CNTRY_SALES;
	BY	COUNTRY
	BY	CAR
END


WebFocus : Inifite ways to skin a car


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Expert
posted Hide Post
"skin a car"
ROFL




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Master
posted Hide Post
@susannah

It was actually a typo.. the R is next to the T. And 'we' type CAR alot more then CAT. :-) Just decided to leave it like that Big Grin


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Virtuoso
posted Hide Post
Dave,
There was no question, I was just sharing and maybe hoped for a more elegant solution.
As for what you suggest, I don't see the recursivity.


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, 2006Report This Post
Expert
posted Hide Post
Looks pretty elegant to me.

Good One


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
Thanks Waz.
Smiler


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, 2006Report This Post
Master
posted Hide Post
@Danny

I thought you were looking for another way to create the output...

...the recursivity needed no enhancements. :-)


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [Sharing] Recursive Drill-Down

Copyright © 1996-2020 Information Builders