PageWidth: Integer;
The PageWidth property determines the number of pages, limiting the size of the table by width on print.
It is used if the FitToPages property is set to True.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Rep: IPrxReport;
Tab: ITabSheet;
TabSettig: ITabPageSettings;
PrScale: ITabPrintScale;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("Reg_rep").Edit;
Rep := MObj As IPrxReport;
Tab := Rep.ActiveSheet.Table;
TabSettig := Tab.PageSettings;
PrScale := TabSettig.Scale;
PrScale.FitToPages := True;
PrScale.PageHeight := 3;
PrScale.PageWidth := 1;
MObj.Save;
End Sub Main;
After executing the example, the page settings for the active sheet of the regular report will be changed. During printing the scale will be selected in such a way, that the data fit 1 page in width and 3 pages in height.
See also: