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.
I have a report that contains 6 compound reports which do a column-total at the end of each one. Is there any way to get a grand total of all the column-totals from each report?
Here is an example
SET COMPOUND OPEN TABLE FILE CAR PRINT CAR DEALER_COST RETAIL_COST SALES BY COUNTRY WHERE COUNTRY EQ 'ENGLAND' ON TABLE COLUMN-TOTAL AS 'TOTAL' END SET COMPOUND CLOSE TABLE FILE CAR PRINT CAR DEALER_COST RETAIL_COST SALES BY COUNTRY WHERE COUNTRY EQ 'ITALY' ON TABLE COLUMN-TOTAL AS 'TOTAL' END
I want a row (at the bottom) that will show a grand total of column-total for England column-total for Italy
Thanks JVThis message has been edited. Last edited by: <Kathryn Henning>,
If the data comes from the same table (as in your example) I would do something like this:
TABLE FILE CAR
SUM
COMPUTE LABEL1/A30 = 'COLUMN TOTAL FOR ' | COUNTRY;
DEALER_COST
RETAIL_COST
SALES
BY COUNTRY
WHERE COUNTRY IN ('ENGLAND', 'ITALY');
ON TABLE HOLD AS HTOTALS
END
SET COMPOUND OPEN
TABLE FILE CAR
PRINT
CAR
DEALER_COST
RETAIL_COST
SALES
BY COUNTRY
WHERE COUNTRY EQ 'ENGLAND'
ON TABLE COLUMN-TOTAL AS 'TOTAL'
END
TABLE FILE CAR
PRINT
CAR
DEALER_COST
RETAIL_COST
SALES
BY COUNTRY
WHERE COUNTRY EQ 'ITALY'
ON TABLE COLUMN-TOTAL AS 'TOTAL'
END
SET COMPOUND CLOSE
TABLE FILE HTOTALS
PRINT
LABEL1 AS ''
DEALER_COST
RETAIL_COST
SALES
END
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
If the data comes from different tables, I would first calculate the totals into two different hold files, then use MORE to concatenate them:
TABLE FILE CAR
SUM
COMPUTE LABEL1/A30 = 'COLUMN TOTAL FOR ' | COUNTRY;
DEALER_COST
RETAIL_COST
SALES
BY COUNTRY
WHERE COUNTRY EQ 'ENGLAND';
ON TABLE HOLD AS HTOTAL1
END
TABLE FILE CAR
SUM
COMPUTE LABEL1/A30 = 'COLUMN TOTAL FOR ' | COUNTRY;
DEALER_COST
RETAIL_COST
SALES
BY COUNTRY
WHERE COUNTRY EQ 'ITALY';
ON TABLE HOLD AS HTOTAL2
END
SET COMPOUND OPEN
TABLE FILE CAR
PRINT
CAR
DEALER_COST
RETAIL_COST
SALES
BY COUNTRY
WHERE COUNTRY EQ 'ENGLAND'
ON TABLE COLUMN-TOTAL AS 'TOTAL'
END
TABLE FILE CAR
PRINT
CAR
DEALER_COST
RETAIL_COST
SALES
BY COUNTRY
WHERE COUNTRY EQ 'ITALY'
ON TABLE COLUMN-TOTAL AS 'TOTAL'
END
SET COMPOUND CLOSE
TABLE FILE HTOTAL1
PRINT
LABEL1 AS ''
DEALER_COST
RETAIL_COST
SALES
MORE
FILE HTOTAL2
END
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
Ok, Francis this helps, but the more I look at it I think all I need to do is put another report in the compound that prints a total for everything and only print the total column for that report.
How would I only print the Total Vol row for this?
TABLE FILE CAR PRINT * ON TABLE COLUMN-TOTAL AS 'TOTAL VOL'; END
And all along, until I completed reading the above post, I was expecting that "Fun with Compound reports" was going to be a bit of a dichotomy, or at least a point of frustration. I personally like the Compound Reports.
Nice job Francis.
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005