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     [CLOSED] Tree structure

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Tree structure
 Login/Join
 
Master
posted
Hai,

What would be the best way to show parent-child realtion in a tree structure (not accordian report)?

I am able to pull out data and could have parent-child transformation but I am confused on how to represent this like a tree structure.
Please post your suggestions.

Thanks

This message has been edited. Last edited by: Kerry,


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Expert
posted Hide Post
Have a look at the FOR statement with WITH CHILDREN option. then use BLANKINDENT to set the indenting of levels.

Your Master must have the parent and child fields defined.


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
Expert
posted Hide Post
Could you elaborate on your request. I'm not sure what, exactly, you're looking to accomplish. Unless what Waz provided is correct. Either way, I'm looking forward to your next post...
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Master
posted Hide Post
Thanks Waz, I will try that.

Doug, I am trying to get a tree structure showing parent on the top and its children as branches and grand children etc..

My master has 2 colums, parent and child which have data in both ways. I made a report to find the parent and its children (multiple levels) and now I want to represent them in tree structure.
Let me know if I am not clear yet.

Thanks


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
<JG>
posted
It's all in the master you need to code the PROPERTY=PARENT_OF attribute into the master

FILEDEF DUMMYM DISK DUMMY.MAS (APPEND
FILEDEF DUMMY DISK DUMMY.FTM (APPEND
-RUN
-WRITE DUMMYM FILE=DUMMY,SUFFIX=FIX
-WRITE DUMMYM FIELDNAME=CHILD, USAGE=A4,ACTUAL=A4, $
-WRITE DUMMYM FIELDNAME=PARENT, USAGE=A4,ACTUAL=A4, PROPERTY=PARENT_OF,REFERENCE=CHILD, $
-*
-WRITE DUMMY 1000
-WRITE DUMMY 20001000
-WRITE DUMMY 21002000
-WRITE DUMMY 22002100
-WRITE DUMMY 22102200
-WRITE DUMMY 22202200
-WRITE DUMMY 22302200
-WRITE DUMMY 22402200
-WRITE DUMMY 22502200
-WRITE DUMMY 23002100
-WRITE DUMMY 23102300
-WRITE DUMMY 23202300
-WRITE DUMMY 23302300
-WRITE DUMMY 23402300
-WRITE DUMMY 23502300
-WRITE DUMMY 24002100
-WRITE DUMMY 24102400
-WRITE DUMMY 24202400
-WRITE DUMMY 24302400
-WRITE DUMMY 24402400
-WRITE DUMMY 24502400
-WRITE DUMMY 25002000
-WRITE DUMMY 26002500
-WRITE DUMMY 26102600
-WRITE DUMMY 26202600
-WRITE DUMMY 26302600
-WRITE DUMMY 26402600
-WRITE DUMMY 26502600
-WRITE DUMMY 27002500
-WRITE DUMMY 28002500
-WRITE DUMMY 30001000
-WRITE DUMMY 31003000
-WRITE DUMMY 31103100
-WRITE DUMMY 31123110
-WRITE DUMMY 31143110
-WRITE DUMMY 31163110
-WRITE DUMMY 31203100
-WRITE DUMMY 31303100
-WRITE DUMMY 31403100
-WRITE DUMMY 32003000
-WRITE DUMMY 33003200
-WRITE DUMMY 33103300
-WRITE DUMMY 33203300
-WRITE DUMMY 33303300
-WRITE DUMMY 34003200
-WRITE DUMMY 34103400
-WRITE DUMMY 34203400
-WRITE DUMMY 34303400
-WRITE DUMMY 34403400
-WRITE DUMMY 34503400
-WRITE DUMMY 34513450
-WRITE DUMMY 34523450
-WRITE DUMMY 34533450
-WRITE DUMMY 34543450
-WRITE DUMMY 34553450
-WRITE DUMMY 35003200
-WRITE DUMMY 35103500
-WRITE DUMMY 35203500
-WRITE DUMMY 35303500
-WRITE DUMMY 36003200
-WRITE DUMMY 37003200
-WRITE DUMMY 37103700
-WRITE DUMMY 37203700
-WRITE DUMMY 37303700
-WRITE DUMMY 38003200
-WRITE DUMMY 39003200
-WRITE DUMMY 39103900
-WRITE DUMMY 39203900
-WRITE DUMMY 39303900
-WRITE DUMMY 39403900
-WRITE DUMMY 39503900
-WRITE DUMMY 50001000
-WRITE DUMMY 51005000
-WRITE DUMMY 52005000

SET BLANKINDENT=ON
TABLE FILE DUMMY
PRINT PARENT NOPRINT
FOR CHILD
1000 WITH CHILDREN ALL
END
 
Report This Post
Master
posted Hide Post
Hey JG,

I cant make changes in the master file.
And also some children exist in parent column too having children..So I wrote recursive joins to get the parents and children.


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
<JG>
posted
The example here has children as parents.

Create a hold file from your source data.
dynamically -WRITE or whatever method you prefer to rewite the hold master and you have everything you need.

Run the sample code and you'll see what I mean.
 
Report This Post
Master
posted Hide Post
Sure JG. I will give a try and will post my results in a day or two..Thanks for all your suggestions..


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Master
posted Hide Post
Hey JG,

I could not write a dummy master as there is huge data.
And the hold fine I create that comes of my report has a parent field and multiple child fieds in levels..

It is like...

Joins on original master

TABLE FILE T1
PRINT
LEVEL4_CHILD
BY PARENT
BY LEVEL1_CHILD
BY LEVEL2_CHILD
BY LEVEL3_CHILD
ON TABLE HOLD AS T2
END
Is there any way to get the tree structure?

Thanks


8.1.05
HTML,PDF,EXL2K, Active, All
 
Posts: 484 | Registered: February 03, 2009Report This Post
Expert
posted Hide Post
DEFINE FILE T1
DUMMY/A10 = ' ' ;
END
TABLE FILE T1
BY DUMMY
BY PARENT
ON TABLE SAVE AS T2
END
FILEDEF T2 DISK t2.ftm (APPEND
TABLE FILE T1
BY PARENT
BY LEVEL1_CHILD
ON TABLE SAVE AS T2
END
TABLE FILE T1
BY LEVEL1_CHILD
BY LEVEL2_CHILD
ON TABLE SAVE AS T2
END
TABLE FILE T1
BY LEVEL2_CHILD 
BY LEVEL3_CHILD 
ON TABLE SAVE AS T2
END
TABLE FILE T1
BY LEVEL3_CHILD 
BY LEVEL4_CHILD 
ON TABLE SAVE AS T2
END
FILEDEF T2 DISK t2.ftm
EX -LINES 5 EDAPUT MASTER,t2,CV,FILE
FILENAME=T2, SUFFIX=FIX,$
SEGNAME=T2, $
  FIELD=PARENT,ALIAS=  ,A10 ,A10 ,PROPERTY=PARENT_OF,REFERENCE=CHILD, $
  FIELD=CHILD,ALIAS=  ,A10 ,A10 ,$

-RUN
SET BLANKINDENT=ON
TABLE FILE T2
PRINT PARENT NOPRINT
FOR CHILD
{Start point} WITH CHILDREN ALL
END


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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Tree structure

Copyright © 1996-2020 Information Builders