I have started a new topic on this since it's really a separate issue/question.
I have a compound focexec -- basically the main FOCEXEC queries for the selected search keys, and then rolls through and executes three different FOCEXECS which are concatenated into one compound report.
The ONLY issue I have at this point is FORCING the compound report break for every parent record. This works with them all concatenated together but i can't cause a page break to happen on the parent key field. I have tried putting the page break in the FOC_MAIN.FEX program but that apparently gets overridden by the NOBREAK directives in this FOCEXEC that compounds them all together. It seems like I should be able to indicate that I want to turn pagebreak back ON within this program, but I haven't found a reference to that yet. Suggestions?
Here's the barebones of what I have at this point. It works in that it creates one huge report with page breaks by sheer line number, but the "heading" of each page just falls wherever. What I want is for the compound report to force a break ONLY at the start of a new PARENT key record.
-* lots of lines collecting sort order and criteria from the calling program
-* primary data joins for the PARENT file reading
-* format the strings for heading information
-SET &SELKEY1 = IF &txtKEY1 EQ '' THEN '' ELSE ' Key 1: ' | &txtKEY1 ;
-SET &SELKEY2 = IF &txtKEY2 EQ '' THEN '' ELSE ' Key 2: ' | &txtKEY2 ;
..
-SET &SELKEYN = IF &txtKEYN EQ '' THEN '' ELSE ' Key N: ' | &txtKEYN ;
-SET &HEADSELECT = &SELKEY1 || &SELKEY2 || .. || &SELKEYN ;
-* ALSO BUILD A STRING HEADSORT FOR THE HEADER
-SET &HEADSORT = 'sorted by ..... ';
TABLE FILE PARENTVIEW
PRINT KEYFIELD
-COLLECT_SORTS
-* here establish the sort order as passed in by calling program
-BUILD_CRITERIA
-* here I build the various WHERE statements based on parameters
-IF &txtKEY1 EQ '' GOTO CK_KEY2;
WHERE KEY1 EQ '&txtKEY1'
-CK-KEY2
-IF &txtKEY2 EQ '' GOTO CK_KEYN;
WHERE KEY2 EQ '&txtKEY2'
-CK-KEYN
-IF &txtKEYN EQ '' GOTO DO_HOLD:
WHERE KEYN EQ '&txtKEYN'
-DO_HOLD
ON TABLE SAVE AS MYOUT FORMAT ALPHA
END
-IF &RECORDS EQ 0 GOTO NORPT;
-RUN
-SET &RECS = &LINES;
-SET &TEL = 1;
SET COMPOUND = OPEN NOBREAK
-GOTO VOLGEND
-START
-VOLGEND
-READ MYOUT &KEYFIELD.17.
-SET &MYKEYFIELD = SUBSTR(17,&KEYFIELD,7,17,11,MYKEYFIELD);
EX FOC_MAIN.FEX KEYFIELD=&MYKEYFIELD, HEADSORT='&HEADSORT', HEADSELECT='&HEADSELECT'
SET COMPOUND = NOBREAK
EX FOC_COMMENTS.FEX KEYFIELD=&MYKEYFIELD
-IF &TEL EQ &RECS GOTO FINISH;
SET COMPOUND = NOBREAK
EX FOC_MATERIALS.FEX KEYFIELD=&MYKEYFIELD
-SET &TEL = &TEL + 1;
-IF &TEL LE &RECS GOTO START;
-FINISH
SET COMPOUND = CLOSE
EX FOC_MATERIALS.FEX KEYFIELD=&MYKEYFIELD
-GOTO EXIT
-NORPT
-HTMLFORM NOREC2
-EXIT
WebFOCUS 7.1.5 on Win2K using SQL2000/SQL2005/ORACLE10.4