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.
-*Margin needs to be a calculated field that will display the following: (where acctnmbr GE 1 and acctnmbr LE 5 then sum(amt))/(where acctnmbr ge 10 and acctnmbr LE 20 then sum(amt)) (account numbers that make up margin will be different for each section)
With the code I'm using as of now, I don't know how to get this to display. I have case statements that make up the categ and subcat fields. I tried adding case statements for the 'Margin' field but I still cannot get it to display the correct way. There are 6 categories and a few sub categories within each category. The calculated fields that I need to display are related to each categ and subcat (the account numbers that make up the margin calc include the same account numbers that make up each categ and one or two subcats. I've tried creating define fields and using the categ and subcat fields to do the division I need but I need the actual $ amount, not the names of the categ and subcat fields. I also tried then adding a compute to the code below but I get an error about 'recap'.
DEFINE FILE HOLD SORT/A50 = IF CATEG EQ 'Revenue' THEN '1' ELSE IF CATEG EQ 'Cost of Sales' THEN '2' ELSE IF CATEG EQ 'Service COS' THEN '3' ELSE IF CATEG EQ 'Indirect COS' THEN '4' ELSE IF CATEG EQ 'General & Administrative' THEN '5' ELSE IF CATEG EQ 'Other Income/Expense' THEN '6' ELSE ''; END -****************************************************************************************** -* DISPLAY FINAL REPORT -****************************************************************************************** TABLE FILE HOLD SUM AMT BY SORT NOPRINT BY CATEG BY SUBCAT ON CATEG SUBTOTAL AS 'Total' WHERE SUBCAT NE '' END
Any suggestions?This message has been edited. Last edited by: Kerry,
You'll probably need the margin field to be inserted in a subfoot because it is a completely separate calculation. In order to get that value, you'll have to
COMPUTE VAL1/D12.2=IF ACCTNMBR GE 1 AND ACCTNMBR LE 5 THEN AMT ELSE 0; NOPRINT COMPUTE VAL2/D12.2=IF ACCTNMBR GE 10 AND ACCTNMBR LE 20 THEN AMT ELSE 0; MARGIN/D6.2=VAL1/VAL2; NOPRINT
Then you can insert the MARGIN field into a subfoot. Seems like this should get what you need - I'm having a little trouble understanding exactly what it is you need. You're referencing account numbers but there is no account number field specified in your code. And you mention category and subcategory a lot but I don't know where they fall into play except as sort fields.
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, 2007