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 outputs X number of detail rows, and then in the sub-footer, gives me the total number of rows.
I'm curious if there is a way to make that total a formula in excel rather than a text string, so that if I delete rows manually, the total would update itself.
Is this possible in WebFOCUS?
My code:
DEFINE FILE SOC_CLR_CLEARANCEREQUEST FOCUS_START/YYMD WITH LAST_NAME=19001231; RECCOUNTER/I8 = 1;
-*Investigation Opened INVSTOPEN1/I7=INVESTIGATION_OPEN; INVSTOPEN2/I7=2415385; INVEST_OPEN/MDYY=FOCUS_START+(INVSTOPEN1-INVSTOPEN2); INVEST_OPEN2/YYMD=FOCUS_START+(INVSTOPEN1-INVSTOPEN2);
-*Cycle Days Calculation CYCLE_DAYS/I8= IF INVESTIGATION_OPEN EQ '' THEN 0 ELSE DATEDIF(INVEST_OPEN2, INVEST_CLSD2, 'D');
-*Number of Days Closed calculation DAYSCLSD/I8= DATEDIF(INVEST_CLSD2, &TODAY , 'D'); END
TABLE FILE SOC_CLR_CLEARANCEREQUEST PRINT CLEARANCE_REQUEST_ID_ AS 'Clearance Request ID' REQUESTER_LOGIN_NAME_ AS 'Employee LMPeople ID' REQUESTER_NAME_ AS 'Employee Name' CATEGORY AS 'Clearance' TYPE AS 'Type' INVESTIGATION_TYPE AS 'Investigation Type' INVEST_OPEN AS 'Investigation Opened Date' INVEST_CLSD AS 'Investigation Closed Date' CYCLE_DAYS AS 'Cycle Days'
RECCOUNTER NOPRINT
BY INVESTIGATION_TYPE NOPRINT BY CLEARANCE_REQUEST_ID_ NOPRINT
ON TABLE RECAP DAYS_AVG/D11.2 = CYCLE_DAYS / RECCOUNTER;
ON TABLE SUBFOOT "" "Total Records = "Average Cycle Time (Days)= -*Days Closed Criteria WHERE INVESTIGATION_CLOSED NE '' WHERE DAYSCLSD LE 30 WHERE INVEST_CLSD LT &TODAY2
The suggestion to use EXL2K FORMULA is a nice one, but will not solve the problem you have. It only would bring a formula for (sub)totals and not for text strings.
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, 2006
Instead of the subfooter displaying "Total = 100", I want the subfooter to display "Total = " & Count(A1:A101). (Where Count(A1:A101) is the number of rows between row 1 and 100).
I can do this once the data gets to Excel, but I was hoping that I could get WebFOCUS to do that for me.
As Frank correctly states, EXL2K FORMULA will not generate formulas for SUBFOOT, SUBHEAD, etc (which are text strings and not report columns). EXL2K FORMULA will generate formulas for SUBTOTAL, RECOMPUTE, SUMMARIZE, etc. which act on the report columns.
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 you have a login to techsupport, have a look at this, it details how to add custom formulas to the bottom of the report.
Another thing, you may want to try (its a bit wacky) is to produce the exl2k document with a hold and post process the file. Where the formula needs to go, put in some unique text. Then process the file (perhaps with DM) and replace the text with you formula (have alook at how the formulas are stored in the exl2K file). Then use
That article is interesting, but I'm not sure how to get it to apply to subfoot sections.
Because I am grouping on a field, I am never sure how many rows will have to be navigated through to find the first and last record in a group, and each group may have a different count, therefore the formula would be different for each.
SET HOLDLIST=PRINTONLY
TABLE FILE CAR
PRINT SALES
COMPUTE NUM/I5=IF COUNTRY EQ LAST COUNTRY THEN LAST NUM + 1 ELSE LAST NUM + 2; NOPRINT
COMPUTE STRT/I5=IF LAST STRT EQ 0 THEN 2 ELSE IF LAST COUNTRY EQ COUNTRY THEN LAST STRT ELSE LAST NUM + 2; NOPRINT
COMPUTE XL/A20 = '=SUM(B' | EDIT(STRT) | ':B' | EDIT(NUM) | ')'; NOPRINT
BY COUNTRY
ON COUNTRY SUBFOOT
"<COUNTRY<XL"
ON TABLE PCHOLD FORMAT EXL2K FORMULA
ON TABLE SET STYLE *
TYPE=SUBFOOT, HEADALIGN=BODY, $
ENDSTYLE
END
If you run this you will see that the formula appears in the right place, but EXCEL still views it as text. Is there a way to 'convince' excel that this is a formula? Maybe somebody has an idea?
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006
It has been a long time since I have done this, but I know that if you click on the formula it will execute. I think it will if you save the report as .xls and reopen it.
Pat WF 7.6.8, AIX, AS400, NT AS400 FOCUS, AIX FOCUS, Oracle, DB2, JDE, Lotus Notes
Posts: 755 | Location: TX | Registered: September 25, 2007
PB, You are right. If you set the cursor on the cell where the formula is and then click of the 'f' in the bar then Excel will transform the text to a formula. But I am not sure that is what is wanted...
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006
I am never sure how many rows will have to be navigated
If you use this technique, you will need to calculate the row number from the data. Just create a counter and use it to determine which row it will be on.
Try this.
DEFINE FILE CAR
CNTR/I9 WITH MODEL= LAST CNTR + 1 ;
FLD1/A200 WITH MODEL='<tr><TD>Total Records</TD><TD></TD><TD></TD><TD x:fmla="=ROW()-3">0</TD></tr>';
END
TABLE FILE CAR
PRINT CNTR
BY COUNTRY
BY CAR
BY MODEL
WHERE COUNTRY EQ 'ITALY'
ON TABLE PCHOLD FORMAT EXL2K FORMULA
FOOTING
"<FLD1"
END
You have to take into account the headings, titles, footings.This message has been edited. Last edited by: Waz,