>>>(...using VFP 3.0b)
>>>I'm trying to insert a page break within a report and I am having problems. Is there a simple command that I can somehow embed in my report to do this?
>>
>>Place a field on the report. In the field, call a UDF. All the UDF does EJECT, then RETURN "".
>
>Craig,
>
>This sounds like it might work, but I have two questions...
>
>1. Will this give expected page breaks on print preview?
>
>2. I am not familiar with UDFs and their usage. I looked through the VFP help and in the few books that I have, but they weren't very helpful. Could you give me some more details as to how this is actually used on the form? I understand placing a field on the form, but then what? Do you create a .pgm file and call it or do you place the commands inside of an expression? I trivial example would be most appreciated!
>
>Thanks,
>Marc Mandel
A UDF is a User Defined Function. Place a field on the report. The only thing the field does is call a UDF, lets call it EJECT. Then in some PRG, you need the function:
FUNCTION EJECT
EJECT
RETURN ""
By returning a 0 length string, nothing gets printed. Yes, it will work in preview.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer