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.
So, we've been given a macro-enabled Excel sheet that shows department totals for our retail stores showing totals for the current week, then right below that totals for quarter-to-date for the sub-dept., and then the totals of all sub-departments (with those total types) below it all. For example:
Departments | Purchase Margin % | Ratio SPread % | Etc.
Meat Deli CW | 30.30 | 8.90 | ...
QTD | 30.30 | 26.11 | ...
Block CW | 16.50 | 100.00 | ...
QTD | 16.50 | 100.00 | ...
Total Meat CW | 21.85 | 20.46 | ... <---- A subtotal/total of just the meat related sub-depts.
QTD | 21.96 | 20.71 | ...
Produce CW | ...
QTD | ...
Deli CW | ...
QTD | ...
Total Fresh CW | ... <---- A grand total of all sub-dept. totals.
QTD | ...
Is there anyone here that has done something similar, and can point me in the right direction for how to implement it in code?
Any help is appreciated. Thanks!This message has been edited. Last edited by: CoolGuy,
8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
Posts: 1113 | Location: USA | Registered: January 27, 2015
Hi CoolGuy, It's not the only way for sure 'cause with Focus there are always multiple ways
But one way could be to create one hold file per type of row having their one id, then merge them together to create the final report.
-* CREATE DETAIL ROWS
DEFINE FILE CAR
DET_ID/I3 = 100;
TOT_ID/I3 = 100;
END
TABLE FILE CAR
SUM RETAIL_COST
TOT_ID
DET_ID
BY COUNTRY
BY CAR
BY MODEL
ON TABLE HOLD AS DETDATA FORMAT FOCUS
END
-RUN
-* CREATE SUB TOTAL ROWS
TABLE FILE CAR
SUM RETAIL_COST
COMPUTE TOT_ID/I3 = 200;
COMPUTE DET_ID/I3 = 100;
BY COUNTRY
BY CAR
BY TOTAL COMPUTE MODEL /A24 = 'Car SubTotal';
ON TABLE HOLD AS STOTDATA FORMAT FOCUS
END
-RUN
-* CREATE SUB TOTAL ROWS
TABLE FILE CAR
SUM RETAIL_COST
COMPUTE TOT_ID/I3 = 300;
COMPUTE DET_ID/I3 = 200;
BY COUNTRY
BY TOTAL COMPUTE CAR /A16 = '';
BY TOTAL COMPUTE MODEL /A24 = 'Country Total';
ON TABLE HOLD AS TOTDATA FORMAT FOCUS
END
-RUN
-* MERGE ALL DATA TOGETHER AND DISPLAY IN THE PROPER ORDER
TABLE FILE DETDATA
SUM RETAIL_COST
BY COUNTRY
BY DET_ID NOPRINT
BY CAR
BY TOT_ID NOPRINT
BY MODEL
MORE
FILE STOTDATA
MORE
FILE TOTDATA
END
-RUN
The result may not be that relevant, but it's the technic that is important to look at.
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
I would agree that FML could help you here. It is in WF8 as I have used it for some reporting. If you're using the GUI, you can access it in AppStudio by clicking the matrix tab at the bottom of the reporting canvas area. You'll have to define a field as the 'For Row' first. I can't seem to access the Tech Support site or I would link the FML documentation.
FML let's you do row-level calculations and reporting, useful for things like accounting roll-ups and Excel-like reporting.
WF 8.2.0.3 Windows 10 64bit HTML, AHTML, PDF, Excel
You will have to define a For Row first before you can use the Matrix tab. For example, you will probably have to structure your data in a way where Departments is your 'For' row and then you report on the different metrics using FML. To define the 'For' row, click the field and then from the 'Field' menu click For Row below Sort Across.
It's a little difficult to explain all the details in a forum post for FML , so if you can get to the documentation via the Technical Library, it should walk you through most of it. I would link it but like I said, the Technical Library is timing out for me when I try to access it today :\
WF 8.2.0.3 Windows 10 64bit HTML, AHTML, PDF, Excel
Thank you for your help and advice. This is the first time in some time I've felt this "newbie" with WF8. I had never really understood what the Matrix tab was for or that FML was even a thing that I could use. Learned something new today!! Thank you!!! lol
I've got the docs up and am looking into this FML thing now. Also, mulling over Martin's example too.
Thank you all!
8.2.02M (production), 8.2.02M (test), Windows 10, all outputs.
Posts: 1113 | Location: USA | Registered: January 27, 2015