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.
Hello, In my Report I used file more option to print the first row for summary line and using the summary line for calculation . The user don't want to see the summary line and just want to see detail line. I appreciate any one have thoughts on this issue....This message has been edited. Last edited by: FP Mod Chuck,
Normally to remove a row you should use a WHERE clause.
One way I think that you should resolve your issue may be by HOLDing the result data meaning that instead of doing a report once your data is all calculated HOLD it to then print it from another TABLE FILE. But I may have miss something since your requirement is not much detailed.
Or you may use multi-verb TABLE FILE instead. It could be an option. below sample is calculating the ratio of RETAIL_COST on total DEALER_COST per COUNTRY.
TABLE FILE CAR
SUM DEALER_COST NOPRINT
BY COUNTRY
SUM COMPUTE RATE/D8.2C = RETAIL_COST / C1;
RETAIL_COST
BY COUNTRY
BY CAR
END
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
Hello, Please see the sample of the car file . I am using first row for calculation the user don't want to see the summary line. Please let me know if you have any other suggestion to hide the first row....
TABLE FILE CAR
SUM
COMPUTE ZSORT/A2 = 'A';
DEALER_COST
BY COMPUTE CAR/A170 = '';
ON TABLE HOLD AS FACHS3A2
END
-RUN
TABLE FILE CAR
SUM
COMPUTE ZSORT/A2 = 'B';
DEALER_COST
COUNTRY
BY CAR/A170
ON TABLE HOLD AS FACHS3B2
END
-RUN
SET BYDISPLAY = ON
TABLE FILE FACHS3A2
SUM
DEALER_COST
BY ZSORT
BY CAR
ON TABLE HOLD AS TESTING
MORE
FILE FACHS3B2
END
TABLE FILE TESTING
SUM
DEALER_COST
COMPUTE TEST1/D12= IF CAR EQ '' THEN 1;
COMPUTE TEST2/D12= IF TEST1 EQ 1 AND ZSORT EQ 'A' THEN DEALER_COST;
COMPUTE TEST3/D12=DEALER_COST/TEST2 * 100;
BY ZSORT
BY CAR
END
-RUN
Same sample as already provided with little changes
DEFINE FILE CAR
DUMMY /A1 = '';
END
TABLE FILE CAR
SUM DEALER_COST NOPRINT
BY DUMMY NOPRINT
SUM DEALER_COST
COMPUTE RATE/D12 = DEALER_COST / C1 * 100;
BY DUMMY NOPRINT
BY CAR
END
-RUN
Or from your own sample as I also already suggested
TABLE FILE CAR
SUM COMPUTE ZSORT/A2 = 'A';
DEALER_COST
BY COMPUTE CAR/A170 = '';
ON TABLE HOLD AS FACHS3A2
END
-RUN
TABLE FILE CAR
SUM COMPUTE ZSORT/A2 = 'B';
DEALER_COST
COUNTRY
BY CAR/A170
ON TABLE HOLD AS FACHS3B2
END
-RUN
SET BYDISPLAY = ON
TABLE FILE FACHS3A2
SUM DEALER_COST
BY ZSORT
BY CAR
ON TABLE HOLD AS TESTING
MORE
FILE FACHS3B2
END
-RUN
TABLE FILE TESTING
SUM DEALER_COST
COMPUTE TEST1/D12= IF CAR EQ '' THEN 1;
COMPUTE TEST2/D12= IF TEST1 EQ 1 AND ZSORT EQ 'A' THEN DEALER_COST;
COMPUTE TEST3/D12=DEALER_COST/TEST2 * 100;
BY ZSORT
BY CAR
ON TABLE HOLD AS RPTDATA
END
-RUN
TABLE FILE RPTDATA
SUM DEALER_COST
TEST3
BY ZSORT
BY CAR
WHERE CAR NE '';
END
-RUN
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
Posts: 2409 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013
Just run your first hold, then do a -READFILE to store the total as a parameter. You can then use the parameter in your calculations.
TABLE FILE CAR
SUM
DEALER_COST
ON TABLE HOLD AS FACHS3A2
END
-RUN
-READFILE FACHS3A2
SET BYDISPLAY = ON
TABLE FILE CAR
SUM
DEALER_COST
COMPUTE TEST1/D12= IF CAR EQ '' THEN 1;
COMPUTE TEST2/D12= &DEALER_COST.EVAL;
COMPUTE TEST3/D12= DEALER_COST/&DEALER_COST.EVAL * 100;
BY CAR
END
-RUN
Hallway
Prod: 8202M1
Test: 8202M4
Repository:
OS:
Outputs:
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015