Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Display an Average in Subfooter

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Display an Average in Subfooter
 Login/Join
 
Platinum Member
posted
I'm using 7.6.4

I have a query that I need to display the total number of records in the SUBFOOT, as well as the average of one of the columns in the SUBFOOT.

The total portion works, but the average portion does not.

Any help would be appreciated.

DEFINE FILE SOC_CLR
RECCOUNTER/I8 = 1;
CYCLE_DAYS/I8= IF INVESTIGATION_OPEN EQ '' THEN 0 ELSE DATEDIF(INVEST_OPEN2, INVEST_CLSD2, 'D');
END

TABLE FILE SOC_CLR
PRINT
REQUESTER_LOGIN_NAME_ AS 'Employee ID'
CYCLE_DAYS AS 'Cycle Days'

ON TABLE SUBFOOT
"Total Records = "Average Cycle Time =
WHERE RECORDLIMIT EQ 10;

ON TABLE PCHOLD FORMAT EXL2K
END

This message has been edited. Last edited by: ColdWhiteMilk,


Production - 7.6.4
Sandbox - 7.6.4
 
Posts: 241 | Location: Bethesda, MD | Registered: August 14, 2007Report This Post
Platinum Member
posted Hide Post
Here's a simple example that might help:

DEFINE FILE CAR
MODELCNT/I3 = 1;
END

TABLE FILE CAR
SUM
DEALER_COST
MODELCNT NOPRINT
BY CAR
BY MODEL

ON TABLE SUBTOTAL

ON TABLE RECAP
COST_AVG/D11.2 = DEALER_COST / MODELCNT;

ON TABLE SUBFOOT
"Total Cars: <TOT.MODELCNT"
"Average Dealer Cost: <COST_AVG"

END


Sean


------------------------------------------------------------------------
PROD: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
TEST: WebFOCUS 7.6.2 on Unix AIX/Tomcat/Servlet Mode
 
Posts: 210 | Location: Ottawa | Registered: November 03, 2005Report This Post
Platinum Member
posted Hide Post
Is there any way to make it work with a TABLE FILE PRINT rather than a TABLE FILE SUM?


Production - 7.6.4
Sandbox - 7.6.4
 
Posts: 241 | Location: Bethesda, MD | Registered: August 14, 2007Report This Post
Virtuoso
posted Hide Post
Try it.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Platinum Member
posted Hide Post
The error message I get is:

0 ERROR AT OR NEAR LINE 38 IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC268) THE FIELD NAME IS NOT REFERENCED IN THE REQUEST STATEMENT: RECCOUNTER
0 ERROR AT OR NEAR LINE 38 IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC125) RECAP CALCULATIONS MISSING
(FOC009) INCOMPLETE REQUEST STATEMENT
BYPASSING TO END OF COMMAND


Production - 7.6.4
Sandbox - 7.6.4
 
Posts: 241 | Location: Bethesda, MD | Registered: August 14, 2007Report This Post
Platinum Member
posted Hide Post
Please disregard my last post. I finally noticed that I was missing the MODELCNT NOPRINT
equivavlent line in my code.

Once I did that I got the desired result.

Thank you all for your help.


Production - 7.6.4
Sandbox - 7.6.4
 
Posts: 241 | Location: Bethesda, MD | Registered: August 14, 2007Report This Post
Platinum Member
posted Hide Post
Can this same thing be done by group?

For example:

DEFINE FILE SOC_CLR
RECCOUNTER/I8 = 1;
CYCLE_DAYS/I8= IF INVESTIGATION_OPEN EQ '' THEN 0 ELSE DATEDIF(INVEST_OPEN2, INVEST_CLSD2, 'D');
END

TABLE FILE SOC_CLR
PRINT
REQUESTER_LOGIN_NAME_ AS 'EmployeeID '
REQUESTER_DEPT AS 'Department'
CYCLE_DAYS AS 'Cycle Days'

BY RECCOUNTER NOPRINT

ON REQUESTER_DEPT RECAP
DAYS_AVG/D11.2 = CYCLE_DAYS / RECCOUNTER;

ON REQUESTER_DEPT SUBFOOT
""
"Total Records = "Average Cycle Time (Days)= ""

ON TABLE PCHOLD FORMAT EXL2K
END

I think the problem is with the "RECAP", but I can't figure out what I'm doing wrong.


Production - 7.6.4
Sandbox - 7.6.4
 
Posts: 241 | Location: Bethesda, MD | Registered: August 14, 2007Report This Post
Virtuoso
posted Hide Post
Please change your code so you will see your reccounter. (remoce the noprint)
You will see it is not what you want it to be.

And your RECAP field should also be a BY field.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Platinum Member
posted Hide Post
Thank you. That worked.

Will WF 7.6.4 let me do a subfooter on a group AND on a table?


Production - 7.6.4
Sandbox - 7.6.4
 
Posts: 241 | Location: Bethesda, MD | Registered: August 14, 2007Report This Post
Virtuoso
posted Hide Post
On a TABLE would not be a subfooter but a report footer.

I would like to suggest some basic training. It will help you a lot.
And search in the documentation for PREFIX values.

You can say

ON COUNTRY SUBFOOT AVE DEALERCOST
ON COUNTRY SUBFOOT MAX DEALERCOST




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Platinum Member
posted Hide Post
Thank you for your help.

I had very basic training 5-6 years ago, but my background is in MS Access development and Visual Basic, so I am trying to get back up to speed on WebFOCUS (which has changed versions several times since I had my initial training).


Production - 7.6.4
Sandbox - 7.6.4
 
Posts: 241 | Location: Bethesda, MD | Registered: August 14, 2007Report This Post
Virtuoso
posted Hide Post
I'm rather experienced in Access and VB, but with WebFocus we can do much more and much quicker, but I have to convince my IT colleagues every time since the only want .NET




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Display an Average in Subfooter

Copyright © 1996-2020 Information Builders