TTMSFNCDataGridPDFIO.Options Property
Grid-specific export options (scaling, fit to page, repeated fixed rows and columns) plus the inherited page, header and footer settings.
API unit family: TMSFNCDataGridPDFIO
Declaring type: TTMSFNCDataGridPDFIO
Inherited from: TTMSFNCCustomDataGridPDFIO
Type: TTMSFNCDataGridPDFIOOptions
Syntax
property Options: TTMSFNCDataGridPDFIOOptions;
__property TTMSFNCDataGridPDFIOOptions* Options = {read=GetOptions, write=SetOptions};
Remarks
Assigning copies the values into the owned instance.
Usage examples
Combine page setup, dynamic footers, and manual page breaks
Configure a repeatable report export with page fitting, repeated fixed rows, dynamic footer text, and row-driven page breaks.
procedure TForm1.FormCreate(Sender: TObject);
begin
PDF.DataGrid := Grid;
PDF.Options.Header := 'Quarterly Report';
PDF.Options.OpenInPDFReader := True;
PDF.Options.RepeatFixedRows := True;
PDF.Options.FitToPage := True;
PDF.OnGetFooter := PDFGetFooter;
PDF.OnRowIsPageBreak := PDFRowIsPageBreak;
end;
procedure TForm1.PDFGetFooter(Sender, AExportObject: TObject;
APageIndex: Integer; var AFooter: UnicodeString);
begin
AFooter := Format('Page %d', [APageIndex + 1]);
end;
procedure TForm1.PDFRowIsPageBreak(Sender: TObject;
AExportObject: TTMSFNCPDFIOExportObject; ARow: Integer;
var IsPageBreak: Boolean);
begin
IsPageBreak := IsGroupHeader(ARow);
end;
using namespace Fmx::Tmsfncdatagridpdfio;
void __fastcall TForm1::FormCreate(TObject *Sender)
{
PDF->DataGrid = Grid;
PDF->Options->Header = "Quarterly Report";
PDF->Options->OpenInPDFReader = true;
PDF->Options->RepeatFixedRows = true;
PDF->Options->FitToPage = true;
PDF->OnGetFooter = PDFGetFooter;
PDF->OnRowIsPageBreak = PDFRowIsPageBreak;
}
void __fastcall TForm1::PDFGetFooter(TObject *Sender, TTMSFNCPDFIOExportObject *AExportObject,
int APageIndex, System::UnicodeString &AFooter)
{
AFooter = Format("Page %d", ARRAYOFCONST((APageIndex + 1)));
}
void __fastcall TForm1::PDFRowIsPageBreak(TObject *Sender,
TTMSFNCPDFIOExportObject *AExportObject, int ARow,
bool &IsPageBreak)
{
IsPageBreak = IsGroupHeader(ARow);
}