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.
This is for FML reports - how do I prevent specific column from being summed?
I have data in the columns of some detail and summary rows. Because of the hierarchy in the FML report, the values in the columns of the detail rows get rolled up to the summary rows. But since I have data values for the summary rows, the data is getting doubled.
It's a little hard to explain :-(This message has been edited. Last edited by: Francis Mariani,
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
I apologize for the amount of stuff I've dumped here, but this is a cleansed version of a report I inherited. Code, metadata and data. If you create three files in baseapp with the content in this post, you should be able to run the report.
Eight rows have data in columns RBND1 and RBND2 (you can see that in the data by scrolling to the right). The rows are: Total Swizzles, Muckworm Swizzles, Jujubes Kickboxed Market Swizzles, Total Fixed Jackal, Pax Junky, Nominal Fixed Jackal, Jujubes Bubblegum Junky, Total Kiwi.
Total Swizzles and Total Fixed Jackal are not showing the values in the data row - it seems they're showing a sum of the descendant values and their own values. How do I use RECAP so that these values are not summed?
Code - fml1.fex
FILEDEF FML1 DISK baseapp/fml1.ftm
SET LINES=99999
TABLE FILE FML1
SUM
SALES
COMPUTE FOR_VALUE/A20 = FMLINFO('FORVALUE', 'A20'); NOPRINT
COMPUTE TOT_SL1/D20.2 = IF FOR_VALUE EQ '1000000000000' THEN SALES ELSE LAST TOT_SL1; NOPRINT
COMPUTE TOT_SL2/D20.2 = IF FOR_VALUE EQ '1020000000000' THEN SALES ELSE LAST TOT_SL2; NOPRINT
COMPUTE TOT_SL1_PER/P7.2B% MISSING ON = IF TOT_SL1 EQ 0 THEN 0 ELSE SALES / TOT_SL1 * 100;
COMPUTE TOT_SL2_PER/P7.2B% MISSING ON =
IF FOR_VALUE EQ '1000000000000' THEN SALES / TOT_SL1 * 100
ELSE IF FOR_VALUE EQ '1010000000000' THEN MISSING
ELSE IF TOT_SL2 EQ 0 THEN MISSING
ELSE SALES / TOT_SL2 * 100;
COMPUTE WGT1/D7.2B% MISSING ON =
IF FOR_VALUE IN ('1020201000000', '1020101000000', '1020102010000', '1020203000000',
'1020202000000', '1020400000000', '1020100000000', '1020200000000') THEN WEIGHT1 ELSE MISSING;
COMPUTE WGT1_DIFF/D7.2B% MISSING ON=IF WGT1 IS MISSING THEN MISSING ELSE TOT_SL2_PER - WGT1;
COMPUTE WGT2/D7.2B% MISSING ON =
IF FOR_VALUE IN ('1020201000000', '1020101000000', '1020102010000', '1020203000000',
'1020202000000', '1020400000000', '1020100000000', '1020200000000') THEN WEIGHT2 ELSE MISSING;
COMPUTE WGT2_DIFF/D7.2B% MISSING ON=IF WGT2 IS MISSING THEN MISSING ELSE TOT_SL2_PER - WGT2;
COMPUTE RBND1/D12.2B% MISSING ON =
IF FOR_VALUE IN ('1020201000000', '1020101000000', '1020102010000', '1020203000000',
'1020202000000', '1020400000000', '1020100000000', '1020200000000') THEN BND1 ELSE MISSING;
COMPUTE RBND2/D12.2B% MISSING ON =
IF FOR_VALUE IN ('1020201000000', '1020101000000', '1020102010000', '1020203000000',
'1020202000000', '1020400000000', '1020100000000', '1020200000000') THEN BND2 ELSE MISSING;
FOR_VALUE
FOR CLASSHIERARCHY
'1000000000000' WITH CHILDREN ALL ADD AS CAPTION LABEL R1
ON TABLE SET FORMULTIPLE ON
ON TABLE SET BLANKINDENT ON
END
Hi Francis, You can't traverse the entire hierarchy and put recaps in certain point in the hierarchy. What you can do is something like this:
CHAN_NAME NOPRINT FOR ACCOUNT_CODE "Revenue" LABEL R1 OVER 2100 WITH CHILDREN 1 ADD AS CAPTION LABEL R2 OVER 2500 WITH CHILDREN 1 ADD AS CAPTION LABEL R3 OVER BAR AS '-' OVER RECAP R5=R2 + R3 ; AS 'Total Revenue' OVER " " LABEL R6 OVER "Expenditures" LABEL R7 OVER 3100 WITH CHILDREN 1 ADD AS CAPTION LABEL R8 OVER 3200 WITH CHILDREN 1 ADD AS CAPTION LABEL R9 OVER 5200 WITH CHILDREN 1 ADD AS CAPTION LABEL R10 OVER BAR AS '-' OVER RECAP R12=R8 + R9 + R10; AS 'Total Expenditures' OVER " " LABEL R13 OVER " " LABEL R14 OVER RECAP R15=R5 - R12 ; AS 'Excess Rev over Exp' OVER BAR AS '='
Harry, thanks for your example. Unfortunately this type of FML report specifies the rows.
For the type of FML in this report, using FOR CLASSHIERARCHY '1000000000000' WITH CHILDREN ALL ADD AS CAPTION LABEL R1 automatically sets up the parents and descendants and automatically indents.
I think the problem is in the data and perhaps the lines COMPUTE WGT1/D7.2B% MISSING ON = IF FOR_VALUE IN ('1020201000000', '1020101000000', '1020102010000', '1020203000000', '1020202000000', '1020400000000', '1020100000000', '1020200000000') THEN WEIGHT1 ELSE MISSING;
I'm still debugging.
Regards,
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
Depending if you want to change columns dynamically, your choices are ether a COMPUTE using the FMLFOR family of functions or using DBA down to the value level.
The values for the verb objects in the fml request are automatically aggregated, both the parent records and all children. This way totals can be put into parent records even if those records have no children. In your case, the bnd1 and bnd2 fields have values for parents (e.g. Total Fixed Jackal) in addition to children. You can force a given parent level to have a zero value, if this is what you really want, by defining the value at retrieval time:
DEFINE FILE FML1
LEV/I4 = CLASSLEVEL ;
MBND1/D7.2 = BND1;
NBND1/D7.2 = IF LEV EQ 3 THEN 0 ELSE BND1;
END
-RUN
TABLE FILE FML1
SUM MIN.LEV MBND1 NBND1
FOR CLASSHIER
'1000000000000' WITH CHILDREN ALL ADD AS CAPTION LABEL R1
ON TABLE SET FORMULTIPLE ON
ON TABLE SET BLANKINDENT ON
ON TABLE HOLD FORMAT WP AS FMLC
END
-RUN
Here is sample output:
Total Fixed Jackal 3 63.21 29.51
Pax Junky 4 6.64 6.64
Nominal Fixed Jackal 4 8.47 8.47
Muckworm Government Junky 5 .00 .00
Inflation-linked Junky 5 .00 .00
Zed DEK Loan Puzzlement Pizza 5 .00 .00
Zed Distressed Pincheck Jingle 5 .00 .00
Gulf Juicy - MTN 5 .00 .00
Jambeaux Mix Reclassifications 5 .00 .00
Icebox Real Maxims - accruals 6 .00 .00
Offset of Gimmick Brazen Gross 6 .00 .00
Jambeaux to Direct Gimmick Gul 6 .00 .00
Jellying to Real Maxims Gulf ( 6 .00 .00
Waxwings to Gimmick Real Maxim 6 .00 .00
Jambeaux to Pincheck on Gimmic 6 .00 .00
Jambeaux to Infrastructure (Pi 6 .00 .00
Puppydom to Gimmick Gulf Pizza 6 .00 .00
Jambeaux to Mix and Zed Pizza 6 .00 .00
Jellying to Upsized Flyspecks 6 .00 .00
Puppydom to Gimmick Brazen (Pi 6 .00 .00
Jujubes Bubblegum Junky 4 14.40 14.40
Jujubes Bubblegum Junky and Eq 5 .00 .00
Is this sort of what you wanted to do?This message has been edited. Last edited by: Edward Wolfgram,