Focal Point
RECAP BUG

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2271009331

October 14, 2005, 02:45 PM
albertl
RECAP BUG
HI
I am using RECAP
ON 'BQ1_LOCC_AXE_NV1' RECAP
SUBFOOT1/P15.2=100*COL01/COL02; NOPRINT
SUBFOOT1E/P15C=COL02; NOPRINT
ON 'PTTC_LOCC_AXE_NV1' RECAP
SUBFOOT2/P15.2=100*COL01/COL02 ; NOPRINT
SUBFOOT2E/P15C=COL02; NOPRINT
And I have this error
HOLDING...
ERREUR A OU PRES DE LA LIGNE 101 DANS PROCEDURETD4AXES FOCEXEC
(FOC002) MOT INCONNU SUBFOOT1E/P15C=COL02;
DERIVATION A LA FIN DE COMMANDE
(FOC009) REQUETE INCOMPLETE
>
AND IF I suppress NOPRINT
ON 'BQ1_LOCC_AXE_NV1' RECAP
SUBFOOT1/P15.2=100*COL01/COL02;
SUBFOOT1E/P15C=COL02;
ON 'PTTC_LOCC_AXE_NV1' RECAP
SUBFOOT2/P15.2=100*COL01/COL02 ;
SUBFOOT2E/P15C=COL02;
NO ERRORS !!!!!

HOLDING...
NB D'ENRG. DANS LA TABLE= 600 LIGNES= 133

HOLDING...
PAUSE.. VEUILLEZ FAIRE UN RETOUR CHARIOT QUAND VOUS SEREZ PRET


THANKS FOR your Help
Albert L
October 14, 2005, 03:00 PM
Leah
Ah, French. Okay, one, I don't think you use a field value the on, you create a subfoot/recap and so on using a field name, then use the When clause to control which you print.

The FOC002 error is telling you it doesn't recognize the word 'suboot1e...' Deceptive error as I do believe it is generated due to the 'ON' expression not being correct.

I be totally wrong on the ON, the code interpretter may not like the use of NOPRINT in a RECAP.

I've never seen recap used except when actually generating a printed report and you appear to be creating a hold file.
October 14, 2005, 03:41 PM
Kerry
Hi Albert,

Here is the info I got from one of our product managers.

The answer is that as soon as you put in NOPRINT, you have stopped the RECAP keyword. So, you won't get any errors if you simply repeat the word RECAP.
ON 'BQ1_LOCC_AXE_NV1' RECAP
SUBFOOT1/P15.2=100*COL01/COL02; NOPRINT
RECAP SUBFOOT1E/P15C=COL02; NOPRINT

ON 'PTTC_LOCC_AXE_NV1' RECAP
SUBFOOT2/P15.2=100*COL01/COL02 ; NOPRINT
RECAP SUBFOOT2E/P15C=COL02; NOPRINT

However, the NOPRINT on a RECAP is irrelevant anyway. RECAP fields will be printed if there is no SUBFOOT on that level (whether or not the NOPRINT is there). They will be NOPRINTed if there IS a SUBFOOT. So, the easiest solution is to eliminate the NOPRINT and then you don't need to put in the word RECAP.


Hope this helps.

Cheers,

Kerry
October 14, 2005, 06:08 PM
albertl
HI
I use RECAP with NOPRINT because I want to resuse the field in a SUBFOOT AND I canot use many RECAP because of the limit of 7 RECAP MAXI
Thanks
Albert
October 14, 2005, 06:49 PM
Leah
Since your recaps look as if they pretty much calculate the same thing but you want to use them in different ways. Here is a fex I have for a report that has to do some bottom of the report totals as well as sort subtotals.
the code of the report generation is old from our mainframe days, but it still works. It pulls together enrollment numbers and financial aid numbers. Note due to the lovely world of how this works I am going to change all of the '<' and '>' to '#' symbols to something else or this post won't go.
JOIN CLEAR *
JOIN E01 IN HOLD2 TO E01 IN HOLDENR AS AJENR
JOIN E01 IN HOLD2 TO E01 IN HOLDENS AS AJENS
DEFINE FILE HOLD2
SIDFORM /A11 = EDIT(E01,'999-99-9999');
XXXCOUNT/D14 WITH XXSTU = 1;
DEXCOUNT/D14 = IF DEPCOUNT GT 0 THEN 1 ELSE 0;
INXCOUNT/D14 = IF INDCOUNT GT 0 THEN 1 ELSE 0;
FUNDAMT/D15.02 = SW130;
DEPAMT/D15.02 = IF DEPCOUNT GT 0 THEN SW130 ELSE 0;
INDAMT/D15.02 = IF INDCOUNT GT 0 THEN SW130 ELSE 0;
DEXAMT/D15.02 = IF DEPCOUNT GT 0 THEN SW130 ELSE 0;
INXAMT/D15.02 = IF INDCOUNT GT 0 THEN SW130 ELSE 0;
FUNDT/D15.02 = SW130;
END

TABLE FILE HOLD2
HEADING CENTER
"UNIVERSITY OF NEBRASKA AT OMAHA"
"&YEARDESC STUDENT PARTICIPATION IN THE NEBRASKA STATE SCHOLARSHIP PROGRAMS"
"(SAP/SSAP/PEAP)"
" "
" FOCEXEC: OSRCPPEC #130"
"REPORTED: &DATE #130"
" "
SUM STUCOUNT NOPRINT
FUNDT NOPRINT
DEPCOUNT NOPRINT
INDCOUNT NOPRINT
DEPAMT NOPRINT
INDAMT NOPRINT
SUM XXXCOUNT NOPRINT
DEXCOUNT NOPRINT
INXCOUNT NOPRINT
FUNDAMT NOPRINT
DEXAMT NOPRINT
INXAMT NOPRINT
COMPUTE FUNDX/A5 = FUND; NOPRINT
COMPUTE FUNDDES/A30 = DECODE FUND ( '8040&D' 'SSAP FEDERAL'
'80416' 'SSAP GENERAL &YEARDESC'
'80426' 'SAP GENERAL &YEARDESC'); NOPRINT
BY FUND NOPRINT PAGE-BREAK
PRINT
AA003 AS ' STUDENT NAME '
SIDFORM AS 'STUDENT ID '
SW130/D15.02 AS ' AWARD AMOUNT '
SA1W1 AS 'IND/DEP,STATUS'
INCOME AS 'INCOME ,LEVEL'
FALLENR AS 'ENR,STATUS,FALL,&FALLYEAR'
SPRINGENR AS 'ENR,STATUS,SPRING,&SPRINGYEAR'
BY FUND NOPRINT PAGE-BREAK
ON FUND SUBHEAD
" "
"FUND #FUNDX - #FUNDDES"
" "
ON FUND SUBFOOT
" "
"FUND #FUNDX - #FUNDDES"
" "
" TOTAL NUMBER OF STUDENTS FOR FUND: #ST.XXXCOUNT# "
" TOTAL AMOUNT AWARDED FOR FUND: #ST.FUNDAMT# "
" TOTAL NUMBER DEPENDENT OF STUDENTS: #ST.DEXCOUNT#"
" TOTAL DEPENDENT AMOUNT AWARDED: #ST.DEXAMT#"
"TOTAL NUMBER INDEPENDENT OF STUDENTS: #ST.INXCOUNT#"
" TOTAL INDEPENDENT AMOUNT AWARDED: #ST.INXAMT#"
ON TABLE RECAP
TOTALSTU/D14 = C1;
TOTALAMT/D15.02 = C2;
TOTALDEP/D14 = C3;
TOTALDMT/D15.02 = C5;
TOTALIND/D14 = C4;
TOTALIMT/D15.02 = C6;
ON TABLE SUBFOOT
" "
" "
" "
"UNIVERSITY OF NEBRASKA AT OMAHA"
"COMBINED PROGRAM TOTALS"
"&YEARDESC AWARD YEAR"
" "
"TOTAL NUMBER UNDUPLICATED OF STUDENTS:
#TOTALSTU# "
" TOTAL AMOUNT AWARDED: #TOTALAMT# "
" TOTAL NUMBER DEPENDENT OF STUDENTS: #TOTALDEP# "
" TOTAL DEPENDENT AMOUNT AWARDED: #TOTALDMT# "
" TOTAL NUMBER INDEPENDENT OF STUDENTS: #TOTALIND# "
" TOTAL INDEPENDENT AMOUNT AWARDED: #TOTALIMT# "
FOOTING
"ENROLLMENT STATUS IS AS OF THE END OF TERM"
"F - FULLTIME, H - HALFTIME, T - THREE QUARTER TIME"
"L - LESS THAN HALFTIME, N - NOT ENROLLED"
"A BLANK IN THE ENROLLMENT STATUS MEANS NO TERM RECORD FOR THE TERM"
ON TABLE SET COMPOUND CLOSE
ON TABLE SET ONLINE-FMT PDF
ON TABLE SET STYLE *
TYPE=REPORT, ORIENTATION = LANDSCAPE , FONT = COURIER, SIZE = 10, $
ENDSTYLE
END