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     [SOLVED] Dynamic FML hierarchy

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Dynamic FML hierarchy
 Login/Join
 
Platinum Member
posted
I'm new to FML and I have two questions:
1. Is there a way to dynamically create an FML hierarchy from a HOLD file?
2. How do I print the entire hierarchy without having to specify the tags? ie, I want to print the entire CENTGL using the GET/WITH CHILDREN ALL, but I don't want to specify the 1000 account. Is there a way to do this? Do I have to have a top-most level parent defined?

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


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Report This Post
Virtuoso
posted Hide Post
1) Depends on the hold file.
What field do you have in it?

2) If you have the master for the FML created you can get all the accounts. Did you try what you suggested?




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Expert
posted Hide Post
What I've done in the past to handle this is to TABLE the file getting all Children without parents, and build the FOR statements, HOLD it and INCLUDE it in the FML request.

e.g.
APP PATH IBINCCEN

TABLE FILE CENTGL
PRINT GL_ACCOUNT
      COMPUTE
      H_TEXT/A20 = ' WITH CHILDREN ALL' ;
WHERE GL_ACCOUNT_PARENT EQ ' '
ON TABLE HOLD AS HLD_FOR FORMAT ALPHA
END

-RUN

TABLE FILE CENTGL
PRINT 
      GL_ACCOUNT_TYPE
      GL_ROLLUP_OP 
      GL_ACCOUNT_LEVEL
FOR GL_ACCOUNT
-INCLUDE HLD_FOR 
ON TABLE PCHOLD FORMAT DHTML
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
Platinum Member
posted Hide Post
Waz, pretty cool. I think that would work nicely. I'll try something along those lines.


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Report This Post
Platinum Member
posted Hide Post
OK, after looking at this, I don't think FML is what I really need. Ultimately, what I'm trying to do is:
TABLE FILE LEDGER
SUM 
     AMOUNT
BY ACCOUNT
BY YEAR ROWS 1985 OVER 1986
END

(Notice, no FML...ROWS/OVER are legit in tables w/o hierarchies)
This works fine, but what I need is to add a final report total that shows the same thing:
TOTAL: 1985
       1986
       1987

Is that doable?


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Report This Post
Virtuoso
posted Hide Post
Doable yes. Just depends on how you want it.

Two reports, one detail, one summary, one right after the other (or a compound report with NOBREAK) would do it.

You could also define a field for each year like

TOT1985/D16.2=IF YEAR EQ '1985' THEN AMOUNT ELSE 0;
TOT1986/D16.2=IF YEAR EQ '1986' THEN AMOUNT ELSE 0;
etc.

Then you could embed those field values in a table footing:

ON TABLE SUBFOOT
"TOTAL: <5><TOT.TOT1985"
"<5><TOT.TOT1986 "
etc.

I was trying to come up with a multi-verb request, but you want the subtotals to ignore your first sort value and a multi-verb set requires all previous sort values to exist in subsequent verb phrases so that won't really work. Someone else might have a better idea - I'm sure there are several ways to do it.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Expert
posted Hide Post
Here's a psuedo-code version of something I did for one of my developers that might work for you. It involves, as Darin said, doing a summary and detail and a little sleight of hand, then MOREing them together.
SET ASNAMES=ON
DEFINE FILE LEDGER
TOTACCT/Ann='TOTAL';
SORTFLD/I2=2;
END
TABLE FILE LEDGER
SUM 
     AMOUNT
BY SORTFLD
BY TOTACCT AS ACCOUNT
BY YEAR 
ON TABLE HOLD AS TOTACCT FORMAT ALPHA
ON TABLE SET HOLDLIST PRINTONLY
DEFINE FILE LEDGER
SORTFLD/I2=1;
END
TABLE FILE LEDGER
SUM 
     AMOUNT
BY SORTFLD NOPRINT
BY ACCOUNT
BY YEAR 
MORE
FILE TOTACCT
END


Note that the TOTACCT field above must have the same format as the 'real' ACCOUNT field. Any you might have to hold the detail one more time.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Platinum Member
posted Hide Post
Both really good options, I'll test them and let you know which was best. Thanks!


Thanks.

Mark
WF 7.6 Windows
 
Posts: 150 | Registered: July 26, 2007Report 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     [SOLVED] Dynamic FML hierarchy

Copyright © 1996-2020 Information Builders