It's a little hard to figure out sometimes exactly what gets generated when. 
 But it seems pretty clear that the page header is being generated before the 
report footer band.  The trick is to move your code into some action that 
happens before the page header on the final page.  In this case, (assuming that 
the report footer is always set to print on a new page) I would try one of 
three 
approaches:

1. Eliminate the whole problem by replacing the PAGE HEADER with a GROUP HEADER 
on the W/O number field.  It won't print at all on the report footer page.

2. Put your code into the GROUP FOOTER AFTER GENERATE or (if none) DETAIL AFTER 
GENERATE.  Determine the maximum W/O to be printed (once, a the beginning of 
the 
report) and then check to see if that's the one you're printing.  If so, turn 
off the field in the page header.  This will only affect the report footer 
because by the time the code is executed you will already have printed the page 
header for the last work order.

3. Put your code in the BEFORE GENERATE action of the PAGE HEADER.  Compare the 
 W/O number to the last one, then store the last one into vLastWO.  If they're 
the same, you're on the report footer and can suppress the fields you don't 
want.  (This assumes each work order is only one page long).
--
Larry

Reply via email to