>>Function EjectIf
>>lparam pcCondition
>>if eval(pcCondition)
>> eject
>>endif
>>return ""
>>
>>I'm not sure your report will reprint the header, though. Haven't tried this for a long time.
>
>I don't know if that will work. In older (2.6 and before) if you did an eject in a user defined function, the report still had it's own internal counters for lines on a page, etc. This caused problems like getting only partial pages later on in the report, when the counters determined there should be an eject. AFAIK, there's no way to access those internal report counters. It may work OK in VFP 5.0, though, I haven't tried anything like that lately.
The internal report line counter is _pLineNo, and setting it to zero (or a value greater than page size) implied an automatic formfeed and was recognized by the report. But, nowadays, whenever you look at help for any of the _p* system variables, it sends you to ... report designer, blabbering about "backward compatibility", which is always under some doubt. I really don't know (and don't have a printer at home to try) what does _pLineNo mean in today's report - is it useful only when ASCII clause is used, or it really counts something - would need few dozen sheets of paper to find out.