AutoHeight: Boolean;
AutoHeight: boolean;
The AutoHeight property determines whether row autofit is used for export to HTML (*.html) and RTF (*.rtf).
Available values:
True. On export the row height is set automatically, depending on the contents of row cells.
False. Default value. Row height is not changed.
Executing the example requires a regular report with the REGL_EXPORT identifier.
Add links to the Metabase, Report and Tab system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Report: IPrxReport;
Tab: ITabSheet;
Exp: ITabSheetExporter;
Begin
MB := MetabaseClass.Active;
Report := MB.ItemById("REGL_EXPORT").Edit As IPrxReport;
Tab := (Report.Sheets.Item(0) As IPrxTable).TabSheet;
Exp := New TabSheetExporter.Create;
Exp.TabSheet := Tab;
Exp.AutoHeight := True;
Exp.BreakIntoLayouts := True;
// Export to RTF:
Exp.ExportToFile("C:\Export.rtf", "RTF");
End Sub UserProc;
After executing the example the report is exported to RTF format. Row height in the output file is set automatically depending on the cell contents. On export the sheet is divided into print pages.
The requirements and result of the Fore.NET Example execution match with those in the Fore Example.
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Report: IPrxReport;
Tab: ITabSheet;
Exp: ITabSheetExporter;
Begin
MB := Params.Metabase;
Report := MB.ItemById["REGL_EXPORT"].Edit() As IPrxReport;
Tab := (Report.Sheets.Item[0] As IPrxTable).TabSheet;
Exp := New TabSheetExporter.Create();
Exp.TabSheet := Tab As TabSheet;
Exp.AutoHeight := True;
Exp.BreakIntoLayouts := True;
// Export to RTF:
Exp.ExportToFile("C:\Export.rtf", "RTF");
End Sub;
See also: