ACEPREP needs to know how many lines will be filled in header and trailer sections (otherwise, it does not know how many detail rows to put on the page). Because it cannot tell which part of an IF statement will be executed, it requires that both produce the same number of lines of output.