mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-10 09:19:49 +02:00
LazReport: Include new PrinterIndex property in frPrintGrid for using PrinterSetupDialog. Issue #29373, patch from Jean Patrick.
git-svn-id: trunk@51260 -
This commit is contained in:
parent
a1d92bb434
commit
6c2d50b2d5
@ -42,6 +42,7 @@ type
|
||||
FDBGrid : TCustomDBGrid;
|
||||
FOnGetValue: TDetailEvent;
|
||||
FOnSetUpColumn: TSetupColumnEvent;
|
||||
FPrinterIndex : Integer;
|
||||
FReport : TfrReport;
|
||||
FReportDataSet : TfrDBDataSet;
|
||||
FColumnDataSet : TfrUserDataSet;
|
||||
@ -79,6 +80,7 @@ type
|
||||
property TitleFont : TFont read FTitleFont write SetTitleFont;
|
||||
property Caption: String read FCaption write FCaption;
|
||||
property Template: string read FTemplate write FTemplate;
|
||||
property PrinterIndex: Integer read FPrinterIndex write FPrinterIndex;
|
||||
property ShowCaption: Boolean read FShowCaption write FShowCaption;
|
||||
property ShowHeaderOnAllPage : boolean read fShowHdOnAllPage write fShowHdOnAllPage default True;
|
||||
property ShowProgress : Boolean read fShowProgress write fShowProgress default false;
|
||||
@ -105,6 +107,7 @@ begin
|
||||
FCaption := 'Grid';
|
||||
FShowCaption := True;
|
||||
fShowProgress:=False;
|
||||
FPrinterIndex := -1;
|
||||
end;
|
||||
|
||||
destructor TfrPrintGrid.Destroy;
|
||||
@ -362,6 +365,12 @@ begin
|
||||
FDataSet.DisableControls;
|
||||
BM:=FDataSet.GetBookmark;
|
||||
try
|
||||
if (FPrinterIndex <> -1) then
|
||||
begin
|
||||
FReport.ChangePrinter(Printer.PrinterIndex, FPrinterIndex);
|
||||
FReport.PrepareReport;
|
||||
end;
|
||||
|
||||
FReport.ShowReport;
|
||||
finally
|
||||
FDataSet.GotoBookmark(BM);
|
||||
|
Loading…
Reference in New Issue
Block a user