Focal Point
Using .fex files for headers and footers

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

July 05, 2012, 02:50 PM
gcarterIT
Using .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.


WebFOCUS 7.6
Windows, All Outputs
July 05, 2012, 02:59 PM
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



WebFOCUS 7.7.05
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



WebFOCUS 7.6
Windows, All Outputs
July 06, 2012, 01:57 PM
gcarterIT
UPDATE:

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?


WebFOCUS 7.6
Windows, All Outputs
July 09, 2012, 02:39 PM
N.Selph
Have you tried the mysterious PRINTPLUS commad?


(Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats)
July 16, 2012, 09:38 AM
gcarterIT
No, But I'll take a look at the PRINTPLUS command.

Thanks.


WebFOCUS 7.6
Windows, All Outputs