Bengt
the pbOverrideFormatting property allows you to define variable height sections
This is how it works
SZDEFINE_SECTION SZREPORTHEADER "ReportHeader" 50 FORCE_PAGEBREAK_NONE FALSE
//
Set pbOverrideFormatting to True
if the pbOverrideFormatting property of a section is set to true the section height in the section line defines the minimum height for the section. If there is not enough room for the minimum height on a page there will be a page break before the section is started
When you are finished printing the section the report class will get the current bottom position to find the bottom end of the section
SZDEFINE_SECTION SZREPORTHEADER "ReportHeader" 50 FORCE_PAGEBREAK_NONE FALSE
//
Set pbOverrideFormatting to True
Procedure DoOutputSection
Send szWriteln ...
Send szWriteln ...
Send szWriteln ...
End_Procedure
END_SECTION
Alternatively you can also set the VBOTTOM coordinate at the end of the section
Remember though that when using variable height sections it is up to you to fire formfeeds when nessecary.
For example in the following code we output a row for each record in a db
Clear ...
Move ...
Find GE
While (Found)
if (not(GetCheckPageForSpace( iSpaceNeeded))) Send DoFormFeed
Send szWriteln ...
Find GT
Loop
In the above sample we use the GetCheckPageForSpace function to test whether there is still enough room available to print something that is iSpaceNeeded tall. You can either hard code the value for iSpaceNeeded based on experience or you can use the VPE render functions to prerender something without printing and get the height nessecary from the rendering and then decide and print.