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.
DEFINE FILE TMP_STAT_LOT
QTEMES/D12S=IF LOT EQ 'ANTERIEUR' THEN 0
ELSE IF TSC_CRIT02 EQ 'GROS DONS' THEN 0
ELSE QTEMSG;
COUT1/D15.4S=IF LOT EQ 'ANTERIEUR' THEN 0
ELSE COUT / QTEMES;
COUTTOT/D12.2=IF LOT EQ 'ANTERIEUR' THEN 0
ELSE IF TSC_CRIT02 EQ 'GROS DONS' THEN 0
ELSE COUT;
DATE1/A8=DATECVT(DTEOUV, 'YYMD', 'A8DMYY');
DATE2/A10=EDIT(DATE1,'99/99/9999');
DATEOUV/A10=IF LOT EQ 'ANTERIEUR' THEN ' ' ELSE DATE2;
BIDON /A1 WITH LIBPROV = ' ' ;
LIBTOTAL_GRP/A70 = TSC_CRIT05 || ' : ' | LIBGRP;
END
TABLE FILE TMP_STAT_LOT
SUM
DATEOUV AS 'Date Env'
QTEMES AS 'Qté Env'
COUT1/D6.3S AS 'C.Unit'
COUTTOT/D12.2S AS 'Coût Total'
NB/D12 AS 'Nombre'
MONTANT/D12.2 AS 'Montant'
COMPUTE DONMOYEN/D12.2 = MONTANT / NB; AS 'Don moyen'
COMPUTE RDT/D12.2S% = ( NB / QTEMES ) * 100; AS '% Rdt'
COMPUTE TAUX/D12.2S = MONTANT / COUTTOT; AS 'Tx Couv'
COMPUTE MARGE/D12.2S = MONTANT - COUTTOT; AS 'Marge brute'
BY BIDON NOPRINT
BY TSC_CRIT02 NOPRINT
BY LIBPROV NOPRINT
BY ORDRE NOPRINT
BY TSC_CRIT01 NOPRINT AS 'Type Action'
BY LIBTYPEACT NOPRINT AS ''
BY LIBTOTAL_GRP NOPRINT
BY LOT AS 'Lot'
BY LIBLOT AS 'Libellé'
ON LIBPROV RECOMPUTE AS 'TOTAL'
ON LIBPROV PAGE-BREAK
ON TSC_CRIT01 SUBHEAD
""
"<TSC_CRIT01 : <LIBTYPEACT "
ON LIBTOTAL_GRP RECOMPUTE
QTEMES
COUTTOT
NB
MONTANT
DONMOYEN
RDT
TAUX
MARGE AS 'Total'
WHEN (LOT NE 'ANTERIEUR' AND LOT NOT LIKE 'ZP%' AND LOT NOT LIKE 'ZF%');
ON LIBTYPEACT RECOMPUTE
QTEMES
COUTTOT
NB
MONTANT
DONMOYEN
RDT
TAUX
MARGE AS 'TOTAL'
ON BIDON RECOMPUTE
QTEMES
COUTTOT
NB
MONTANT
DONMOYEN
RDT
TAUX
MARGE AS 'TOTAL GENERAL'
ON TABLE SUBHEAD
"&LIBETAT"
"&LIBETAT2"
HEADING
" <LIBPROV "
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL2K TEMPLATE 'MVE_STATLOT' SHEETNUMBER 1
What I want to do is to calculate a new field on the recompute.
I tried this but It does not work.
ON LIBTOTAL_GRP RECOMPUTE
QTEMES
COMPUTE COUT1B/D6.3S = COUTTOT / QTEMES;
COUTTOT
NB
MONTANT
DONMOYEN
RDT
TAUX
MARGE AS 'Total'
WHEN (LOT NE 'ANTERIEUR' AND LOT NOT LIKE 'ZP%' AND LOT NOT LIKE 'ZF%');
I also tried this but It does not work
ON LIBTOTAL_GRP RECOMPUTE
QTEMES
AVE.COUT1
COUTTOT
NB
MONTANT
DONMOYEN
RDT
TAUX
MARGE AS 'Total'
If you have any idea on how to do such calculation, I would appreciate your answer. Thanks in advance. CatherineThis message has been edited. Last edited by: Cati - France,
7.7.02 (Html, Excel, Ahtml, Pdf,Graph,.....) OS400 V5R3, V5R4 Windows 2000/2003/2007/2010
Posts: 68 | Location: France | Registered: February 27, 2008
You can use the SUMMARYLINES=NEW option, but I don't think it will help you:
-* File CatiFrance4.fex
SET SUMMARYLINES=NEW
TABLE FILE CAR
PRINT
SALES
SEATS
COMPUTE SALESPERSEAT/D9.2=SALES / SEATS;
BY COUNTRY
BY CAR
BY BODYTYPE
ON CAR RECOMPUTE
SALES
SEATS
SALESPERSEAT
ON COUNTRY RECOMPUTE
AVE. SALES
SEATS
SALESPERSEAT
END
However, if you don't mind using SUBFOOT instead of RECOMPUTE, you can do all your calculations using RECAP and then insert the results in SUBFOOT.
With some STYLEing, you can align the results under the respective columns.
Bonne chance!
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