July 05, 2012, 02:50 PM
gcarterITUsing .fex files for headers and footers
Below is a sketch of my code that loops thru a db to print form letters. The line 'EX letterhead.fex' inserts a letterhead created by an external .fex file. This works fine.
-REPEAT XLOOP FOR &XIND FROM 1 TO &XCNT
EX letterhead.fex
TABLE FILE ACL_HOLD2
ON TABLE SET PAGE-NUM OFF...
ON TABLE SET STYLE ...
ENDSTYLE
END
-XLOOP
I want to do the same thing for the footer, using footer.rex, but the following...
-REPEAT XLOOP FOR &XIND FROM 1 TO &XCNT
EX letterhead.fex
TABLE FILE ACL_HOLD2
ON TABLE SET PAGE-NUM OFF...
ON TABLE SET STYLE ...
ENDSTYLE
END
EX footer.fex
-XLOOP
... inserts a page break before the footer, when I want the footer on the same page. After the header and content there is plenty of room for the footer. What should I do to suppress the page break?
Thanks.
July 05, 2012, 02:59 PM
Dan SatchellYou might try this:
-REPEAT XLOOP FOR &XIND FROM 1 TO &XCNT
EX letterhead.fex
TABLE FILE ACL_HOLD2
FOOTING
-INCLUDE footer.fex
ON TABLE SET PAGE-NUM OFF...
ON TABLE SET STYLE ...
ENDSTYLE
END
-XLOOP
July 05, 2012, 03:29 PM
gcarterIT"0 ERROR AT OR NEAR LINE 6 IN PROCEDURE footer
(FOC002) A WORD IS NOT RECOGNIZED: DEFINE
BYPASSING TO END OF COMMAND
(FOC3298) ERROR FOUND IN A COMPOUND REPORT
Compound Report is TERMINATING....."
Seems to have choked on finding DEFINE in footer.fex.
Thanks anyway.
quote:
Originally posted by Dan Satchell:
You might try this:
-REPEAT XLOOP FOR &XIND FROM 1 TO &XCNT
EX letterhead.fex
TABLE FILE ACL_HOLD2
FOOTING
-INCLUDE footer.fex
ON TABLE SET PAGE-NUM OFF...
ON TABLE SET STYLE ...
ENDSTYLE
END
-XLOOP
July 06, 2012, 01:57 PM
gcarterITUPDATE:
Apparently it was a spacing issue.
When I removed some lines from the content section, the footer did appear on the same page as desired. When I changed 'FOOTING' to 'FOOTING BOTTOM', the footer moved to the bottom of the page. All good.
However, there is still a big gap between the content ond the footer. And when I try to add back the removed lines, the footer gets shoved to a new page. My guess is there is a margin below the content and an additional margin above the footer that accounts for the big gap between the the two. And setting TOPMARGIN=0.0000000 and/or BOTTOMMARGIN=0.000000, does not seem to reduce this gap.
Any sugggestions?
July 09, 2012, 02:39 PM
N.SelphHave you tried the mysterious PRINTPLUS commad?
July 16, 2012, 09:38 AM
gcarterITNo, But I'll take a look at the PRINTPLUS command.
Thanks.