LazReport: Patch from Alexey Lagunov

1. Copies collation is done internally
2. Property has been implemented lrMemo.Text
3. Finalized editor of the prepared report
4. Fixed bug when printing TfrPrintGrid after a call to another report designer

git-svn-id: trunk@43775 -
This commit is contained in:
jesus 2014-01-20 03:35:56 +00:00
parent 103d6a39e3
commit d877b82218
7 changed files with 420 additions and 169 deletions

View File

@ -137,6 +137,8 @@ type
protected
procedure PaintDesignControl; override;
function CreateControl:TControl;override;
function GetText:string;override;
procedure SetText(AValue:string);override;
public
constructor Create(AOwnerPage:TfrPage); override;
procedure LoadFromXML(XML: TLrXMLConfig; const Path: String); override;
@ -785,6 +787,16 @@ begin
Result:=TMemo.Create(nil);
end;
function TlrMemo.GetText: string;
begin
Result:=TMemo(FControl).Lines.Text;
end;
procedure TlrMemo.SetText(AValue: string);
begin
TMemo(FControl).Lines.Text:=AValue;
end;
constructor TlrMemo.Create(AOwnerPage: TfrPage);
begin
inherited Create(AOwnerPage);

View File

@ -189,6 +189,8 @@ type
procedure SetWidth(AValue: Integer);virtual;
procedure SetHeight(AValue: Integer);virtual;
procedure SetVisible(AValue: Boolean);virtual;
function GetText:string;virtual;
procedure SetText(AValue:string);virtual;
public
x, y, dx, dy: Integer;
@ -964,6 +966,7 @@ type
TfrReport = class(TComponent)
private
FDataType: TfrDataType;
FDefaultCollate: boolean;
FOnDBImageRead: TOnDBImageRead;
FDefaultCopies: Integer;
FMouseOverObject: TMouseOverObjectEvent;
@ -1140,6 +1143,8 @@ type
property DefExportFilterClass: string read fDefExportFilterClass write fDefExportFilterClass;
property DefExportFileName: string read fDefExportFileName write fDefExportFileName;
property DefaultCollate : boolean read FDefaultCollate write FDefaultCollate;
published
property Dataset: TfrDataset read FDataset write FDataset;
property DefaultCopies: Integer read FDefaultCopies write FDefaultCopies default 1;
@ -1195,6 +1200,7 @@ type
procedure SetModified(AValue: Boolean);virtual;
public
Page: TfrPage;
PreparedReportEditor:boolean;
procedure {%H-}RegisterObject(ButtonBmp: TBitmap; const ButtonHint: String;
ButtonTag: Integer; ObjectType:TfrObjectType); virtual; abstract;
procedure {%H-}RegisterTool(const MenuCaption: String; ButtonBmp: TBitmap;
@ -1434,7 +1440,18 @@ var
CompositeMode: Boolean;
MaxTitleSize: Integer = 0;
FHyp: THyphen = nil;
{-----------------------------------------------------------------------------}
const
PropCount = 6;
PropNames: Array[0..PropCount - 1] of String =
('Text','FontName', 'FontSize', 'FontStyle', 'FontColor', 'Adjust');
ColNames: Array[0..16] of String =
('clWhite', 'clBlack', 'clMaroon', 'clGreen', 'clOlive', 'clNavy',
'clPurple', 'clTeal', 'clGray', 'clSilver', 'clRed', 'clLime',
'clYellow', 'clBlue', 'clFuchsia', 'clAqua', 'clTransparent');
{$IFDEF DebugLR}
function Bandtyp2str(typ: TfrBandType): string;
begin
@ -10139,7 +10156,7 @@ end;
procedure TfrReport.DoPrintReport(const PageNumbers: String; Copies: Integer);
var
i, j: Integer;
k, FCollateCopies: Integer;
f: Boolean;
pgList: TStringList;
@ -10237,6 +10254,32 @@ var
end;
{$ENDIF}
procedure InternalPrintEMFPage;
var
i, j:integer;
begin
for i := 0 to EMFPages.Count - 1 do
begin
if (pgList.Count = 0) or (pgList.IndexOf(IntToStr(i + 1)) <> -1) then
begin
for j := 0 to Copies - 1 do
begin
{$IFDEF DebugLR}
DebugPrnInfo('=== Before PrintPage('+IntToStr(i)+')');
{$ENDIF}
PrintPage(i);
if Terminated then
begin
Printer.Abort;
pgList.Free;
Exit;
end;
end;
end;
end;
end;
begin
{$IFDEF DebugLR}
DebugLn('DoPrintReport INIT');
@ -10246,9 +10289,12 @@ begin
pgList := TStringList.Create;
ParsePageNumbers;
if Copies <= 0 then
Copies := 1;
FCollateCopies:=Copies;
with EMFPages[0]^ do
begin
Prn.SetPrinterInfo(pgSize, pgWidth, pgHeight, pgOr);
@ -10264,27 +10310,38 @@ begin
Printer.BeginDoc;
f:= True;
for i := 0 to EMFPages.Count - 1 do
if FDefaultCollate then
begin
if (pgList.Count = 0) or (pgList.IndexOf(IntToStr(i + 1)) <> -1) then
Copies:=1;
for k:=1 to FCollateCopies do
InternalPrintEMFPage;
end
else
InternalPrintEMFPage;
(* begin
for i := 0 to EMFPages.Count - 1 do
begin
for j := 0 to Copies - 1 do
if (pgList.Count = 0) or (pgList.IndexOf(IntToStr(i + 1)) <> -1) then
begin
{$IFDEF DebugLR}
DebugPrnInfo('=== Before PrintPage('+IntToStr(i)+')');
{$ENDIF}
PrintPage(i);
if Terminated then
for j := 0 to Copies - 1 do
begin
Printer.Abort;
pgList.Free;
Exit;
{$IFDEF DebugLR}
DebugPrnInfo('=== Before PrintPage('+IntToStr(i)+')');
{$ENDIF}
PrintPage(i);
if Terminated then
begin
Printer.Abort;
pgList.Free;
Exit;
end;
end;
end;
end;
end;
end; *)
Printer.EndDoc;
pgList.Free;
{$IFDEF DebugLR}
@ -10382,6 +10439,7 @@ begin
Designer.Page := nil;
frDesigner := TfrReportDesigner(frDesigner.ClassType.NewInstance);
frDesigner.Create(nil){%H-};
frDesigner.PreparedReportEditor:=true;
Stream := TMemoryStream.Create;
SaveToStream(Stream);
Pages.Clear;
@ -10600,7 +10658,10 @@ var
n:integer;
PropInfo:PPropInfo;
St:string;
i:integer;
begin
(*
{ !!!! Надо переписать и дописать!!!!
if Name = 'CURY' then
begin
@ -10682,6 +10743,143 @@ begin
end;
end;
*)
t := CurView;
Prop := AName;
if frVariables.IndexOf(AName) <> -1 then
begin
AValue := frVariables[AName];
exit;
end;
if AName = 'FREESPACE' then
begin
AValue:=IntToStr(CurPage.CurBottomY-CurPage.CurY);
exit;
end;
N:=PosLast('.', AName);
t:=nil;
if N>0 then
begin
Prop:=Copy(AName, N+1, Length(AName));
Delete(AName, N, Length(AName));
//Проверим - существует ли такой объект?
t := FindObjectByName(AName);
end;
(*
if Pos('.', AName) <> 0 then
begin
//Find Object
t := CurPage.FindRTObject(Copy(AName, 1, Pos('.', AName) - 1));
if not Assigned(t) then
t:=CurReport.FindObject(Copy(AName, 1, Pos('.', AName) - 1));
//Property of object
Prop:=Copy(AName, Pos('.', AName)+1, Length(AName));
end;
*)
// if not Assigned(t) then
// frParser.OnGetValue(Name, Value)
// else
if Assigned(t) then
begin
//Retreive property informations
PropInfo:=GetPropInfo(t,Prop);
if Assigned(PropInfo) then
begin
{$IFDEF DebugLR}
DebugLn('TInterpretator.GetValue(',Name,') Prop=',Prop, ' Kind=',InttoStr(Ord(PropInfo^.PropType^.Kind)));
{$ENDIF}
case PropInfo^.PropType^.Kind of
tkChar,tkAString,tkWString,
tkSString,tkLString :
begin
St:=GetStrProp(t, Prop);
{$IFDEF DebugLR}
DebugLn('St=',St);
{$ENDIF}
AValue:=St;
end;
tkBool,tkInt64,tkQWord,
tkInteger : AValue:=GetOrdProp(t,PropInfo);
tkSet : begin
St:=GetSetProp(t,Prop);
{$IFDEF DebugLR}
DebugLn('St=',St);
{$ENDIF}
AValue:=St;
end;
tkFloat : AValue:=GetFloatProp(t,Prop);
tkEnumeration : begin
St:=GetEnumProp(t,Prop);
{$IFDEF DebugLR}
DebugLn('St=',St);
{$ENDIF}
AValue:=St;
end;
end;
end
else
begin
// it's not a property of t, try with known color names first
for i := 0 to 16 do
if AnsiCompareText(ColNames[i], Prop) = 0 then
begin
// color constant found.
if i <> 16 then
AValue := frColors[i]
else
AValue := clNone;
exit;
end;
// it's not a color name, try with customized properties
// not included directly in t
if not (t is TfrBandView) then
begin
for i:=0 to propcount-1 do
if CompareText(PropNames[i], Prop)=0 then
begin
{$IFDEF DebugLR}
DbgOut('A CustomField was found ', Prop);
if i=0 then
DbgOut(', t.memo.text=',DbgStr(t.Memo.Text));
DebugLn;
{$ENDIF}
case i of
0: AValue := t.GetText; //t.Memo.Text;
1: AValue := TfrMemoView(t).Font.Name;
2: AValue := TfrMemoView(t).Font.Size;
3: AValue := frGetFontStyle(TfrMemoView(t).Font.Style);
4: AValue := TfrMemoView(t).Font.Color;
5: AValue := TfrMemoView(t).Adjust;
end;
exit;
end;
end;
end;
{$IFDEF DebugLR}
DebugLn('TInterpretator.GetValue(',Name,') No Propinfo for Prop=',Prop);
{$ENDIF}
(*
if VarIsNull(AValue) or VarIsEmpty(AValue) then
begin
{$IFDEF DebugLR}
DebugLn('TInterpretator.GetValue(',Name,')=NULL >> Value="',Name,'"');
{$ENDIF}
AValue:=Name;
end
*)
{$IFDEF DebugLR}
else
DebugLn('TInterpretator.GetValue(',Name,')=',VarToStr(Value));
{$ENDIF}
end;
end;
procedure TfrReport.GetCategoryList(List: TStrings);
@ -11375,16 +11573,6 @@ begin
{$ENDIF}
end;
{-----------------------------------------------------------------------------}
const
PropCount = 6;
PropNames: Array[0..PropCount - 1] of String =
('Text','FontName', 'FontSize', 'FontStyle', 'FontColor', 'Adjust');
ColNames: Array[0..16] of String =
('clWhite', 'clBlack', 'clMaroon', 'clGreen', 'clOlive', 'clNavy',
'clPurple', 'clTeal', 'clGray', 'clSilver', 'clRed', 'clLime',
'clYellow', 'clBlue', 'clFuchsia', 'clAqua', 'clTransparent');
{$WARNINGS OFF}
@ -11396,6 +11584,9 @@ var
St : String;
i : Integer;
begin
if Assigned(frParser.OnGetValue) then
frParser.OnGetValue(Name, Value);
(*
{$IFDEF DebugLR}
DebugLn('TInterpretator.GetValue(',Name,') INIT');
{$ENDIF}
@ -11491,7 +11682,7 @@ begin
DebugLn;
{$ENDIF}
case i of
0: Value := t.Memo.Text;
0: Value := t.GetText; //t.Memo.Text;
1: Value := TfrMemoView(t).Font.Name;
2: Value := TfrMemoView(t).Font.Size;
3: Value := frGetFontStyle(TfrMemoView(t).Font.Style);
@ -11522,6 +11713,7 @@ begin
DebugLn('TInterpretator.GetValue(',Name,')=',VarToStr(Value));
{$ENDIF}
end;
*)
end;
{$WARNINGS ON}
@ -11604,7 +11796,7 @@ begin
DebugLn;
{$ENDIF}
case i of
0: t.Memo.Text := Value;
0: T.SetText(Value); //t.Memo.Text := Value;
1: TfrMemoView(t).Font.Name := Value;
2: TfrMemoView(t).Font.Size := Value;
3: TfrMemoView(t).Font.Style := frSetFontStyle(Value);
@ -11758,6 +11950,16 @@ begin
fVisible:=AValue;
end;
function TfrObject.GetText: string;
begin
Result:=fMemo.Text;
end;
procedure TfrObject.SetText(AValue: string);
begin
fMemo.Text:=AValue;
end;
procedure TfrObject.SetWidth(AValue: Integer);
begin
DX:=AValue;

View File

@ -6271,7 +6271,7 @@ var
Res:integer;
begin
// if FileModified and (CurReport<>nil) and
if Modified and (CurReport<>nil) and
if (not PreparedReportEditor) and Modified and (CurReport<>nil) and
(not ((csDesigning in CurReport.ComponentState) and CurReport.StoreInForm)) then
begin
Res:=Application.MessageBox(PChar(sSaveChanges + ' ' + sTo + ' ' + ExtractFileName(CurDocName) + '?'),

View File

@ -244,6 +244,7 @@ var
Page: TfrPage;
BM : TBookMark;
XPos,YPos: Integer;
SaveDesign:TfrReportDesigner;
begin
if (FDBGrid = nil) or (TDBGrid(DBGrid).Datasource = nil) or
(TDBGrid(DBGrid).Datasource.Dataset = nil) then Exit;
@ -251,6 +252,9 @@ begin
if (FTemplate<>'') and not FileExists(FTemplate) then
raise Exception.CreateFmt('Template file %s does not exists',[FTemplate]);
SaveDesign:=frDesigner;
frDesigner:=nil;
FReport := TfrReport.Create(Self);
if FTemplate<>'' then
FReport.LoadFromFile(FTemplate);
@ -369,6 +373,7 @@ begin
FReportDataSet.Free;
FColumnDataSet.Free;
end;
SaveDesign:=frDesigner;
end;
procedure TfrPrintGrid.OnEnterRect(Memo: TStringList; View: TfrView);

View File

@ -1,15 +1,15 @@
object frPrintForm: TfrPrintForm
Left = 322
Height = 286
Top = 202
Width = 368
Left = 414
Height = 296
Top = 173
Width = 390
HorzScrollBar.Page = 367
VertScrollBar.Page = 269
ActiveControl = OkButton
BorderStyle = bsDialog
Caption = 'Print'
ClientHeight = 286
ClientWidth = 368
ClientHeight = 296
ClientWidth = 390
OnCreate = FormCreate
OnDeactivate = FormDeactivate
Position = poScreenCenter
@ -36,169 +36,195 @@ object frPrintForm: TfrPrintForm
Visible = False
end
object Label1: TLabel
Left = 16
Height = 16
Top = 76
Width = 43
AnchorSideLeft.Control = Owner
AnchorSideBottom.Control = E1
AnchorSideBottom.Side = asrBottom
Left = 6
Height = 19
Top = 87
Width = 40
Anchors = [akLeft, akBottom]
BorderSpacing.Left = 6
Caption = 'Copies'
FocusControl = E1
ParentColor = False
end
object E1: TEdit
Left = 64
Height = 22
Top = 72
Width = 61
HelpContext = 99
TabOrder = 0
Text = '1'
end
object GroupBox2: TGroupBox
Left = 8
Height = 176
Top = 104
Width = 253
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = E1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = CancelButton
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 6
Height = 178
Top = 112
Width = 318
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Around = 6
Caption = 'Page range'
ClientHeight = 154
ClientWidth = 245
TabOrder = 1
ClientHeight = 158
ClientWidth = 316
TabOrder = 0
object Label2: TLabel
Left = 14
Height = 59
Top = 91
Width = 228
AnchorSideLeft.Control = GroupBox2
AnchorSideTop.Control = E2
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = GroupBox2
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = GroupBox2
AnchorSideBottom.Side = asrBottom
Left = 6
Height = 51
Top = 101
Width = 304
Anchors = [akTop, akLeft, akRight, akBottom]
AutoSize = False
BorderSpacing.Around = 6
Caption = 'Enter page numbers and/or page ranges, separated by commas. For example, 1,3,5-12'
ParentColor = False
WordWrap = True
end
object RB1: TRadioButton
Left = 8
Height = 18
Top = 20
Width = 37
AnchorSideLeft.Control = GroupBox2
AnchorSideTop.Control = GroupBox2
Left = 6
Height = 23
Top = 6
Width = 42
HelpContext = 108
BorderSpacing.Around = 6
Caption = 'All'
Checked = True
TabOrder = 0
TabStop = True
end
object RB2: TRadioButton
Left = 8
Height = 18
Top = 40
AnchorSideLeft.Control = GroupBox2
AnchorSideTop.Control = RB1
AnchorSideTop.Side = asrBottom
Left = 6
Height = 23
Top = 35
Width = 103
HelpContext = 118
BorderSpacing.Around = 6
Caption = 'Current &page'
TabOrder = 1
end
object RB3: TRadioButton
Left = 8
Height = 18
Top = 60
Width = 82
AnchorSideLeft.Control = GroupBox2
AnchorSideBottom.Control = E2
AnchorSideBottom.Side = asrBottom
Left = 6
Height = 23
Top = 72
Width = 83
HelpContext = 124
Anchors = [akLeft, akBottom]
BorderSpacing.Left = 6
Caption = '&Numbers:'
OnClick = RB3Click
TabOrder = 2
end
object E2: TEdit
Left = 88
Height = 22
Top = 58
Width = 155
AnchorSideLeft.Control = RB3
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = RB2
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = GroupBox2
AnchorSideRight.Side = asrBottom
Left = 95
Height = 31
Top = 64
Width = 215
HelpContext = 133
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
OnClick = E2Click
TabOrder = 3
end
end
object Panel1: TPanel
Left = 106
Height = 17
Top = 74
Width = 17
BevelOuter = bvNone
ClientHeight = 17
ClientWidth = 17
FullRepaint = False
TabOrder = 2
object frSpeedButton1: TSpeedButton
Left = 0
Height = 8
Top = 0
Width = 17
Glyph.Data = {
86000000424D8600000000000000760000002800000007000000040000000100
0400000000001000000000000000000000001000000000000000000000000000
80000080000000808000800000008000800080800000C0C0C000808080000000
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00FFFFFFF0F000
00F0FF000FF0FFF0FFF0
}
Spacing = 0
OnClick = frSpeedButton1Click
end
object frSpeedButton2: TSpeedButton
Left = 0
Height = 8
Top = 9
Width = 17
Glyph.Data = {
86000000424D8600000000000000760000002800000007000000040000000100
0400000000001000000000000000000000001000000000000000000000000000
80000080000000808000800000008000800080800000C0C0C000808080000000
FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00FFF0FFF0FF00
0FF0F00000F0FFFFFFF0
}
OnClick = frSpeedButton2Click
end
end
object OkButton: TButton
Left = 282
Height = 25
Top = 108
Width = 75
AnchorSideLeft.Control = CancelButton
AnchorSideTop.Control = GroupBox1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 330
Height = 31
Top = 75
Width = 54
HelpContext = 40
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Top = 6
BorderSpacing.Right = 6
Caption = 'Ok'
Default = True
ModalResult = 1
TabOrder = 3
TabOrder = 1
end
object CancelButton: TButton
Left = 282
Height = 25
Top = 136
Width = 75
AnchorSideTop.Control = OkButton
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 330
Height = 31
Top = 112
Width = 54
HelpContext = 50
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Around = 6
Cancel = True
Caption = 'Cancel'
ModalResult = 2
TabOrder = 4
TabOrder = 2
end
object GroupBox1: TGroupBox
Left = 8
Height = 49
Top = 8
Width = 349
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 6
Height = 63
Top = 6
Width = 378
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Around = 6
Caption = 'Printer'
ClientHeight = 27
ClientWidth = 341
TabOrder = 5
ClientHeight = 43
ClientWidth = 376
TabOrder = 3
object PropButton: TButton
Left = 264
Height = 25
Top = 1
AnchorSideTop.Control = GroupBox1
AnchorSideRight.Control = GroupBox1
AnchorSideRight.Side = asrBottom
Left = 295
Height = 31
Top = 6
Width = 75
HelpContext = 152
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Around = 6
Caption = 'Properties'
OnClick = PropButtonClick
TabOrder = 0
end
object CB1: TComboBox
Left = 8
Height = 20
Top = 1
Width = 245
AnchorSideLeft.Control = GroupBox1
AnchorSideTop.Control = GroupBox1
AnchorSideRight.Control = PropButton
Left = 6
Height = 31
Top = 6
Width = 283
HelpContext = 142
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
ItemHeight = 0
OnChange = CB1Click
OnClick = CB1Click
@ -207,8 +233,35 @@ object frPrintForm: TfrPrintForm
TabOrder = 1
end
end
object cbCollate: TCheckBox
AnchorSideLeft.Control = E1
AnchorSideLeft.Side = asrBottom
AnchorSideBottom.Control = E1
AnchorSideBottom.Side = asrBottom
Left = 139
Height = 23
Top = 83
Width = 70
Anchors = [akLeft, akBottom]
BorderSpacing.Left = 6
Caption = 'Collate'
TabOrder = 4
end
object E1: TSpinEdit
AnchorSideLeft.Control = Label1
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = GroupBox1
AnchorSideTop.Side = asrBottom
Left = 52
Height = 31
Top = 75
Width = 81
BorderSpacing.Around = 6
TabOrder = 5
Value = 1
end
object PrinterSetupDialog1: TPrinterSetupDialog
left = 296
top = 192
left = 264
top = 80
end
end

View File

@ -17,7 +17,7 @@ interface
uses
Classes, SysUtils, LResources,
Forms, Controls, Graphics, Dialogs,
Buttons, StdCtrls,LCLIntf,ExtCtrls,
Buttons, StdCtrls,LCLIntf,ExtCtrls, Spin,
PrintersDlgs;
type
@ -25,16 +25,13 @@ type
{ TfrPrintForm }
TfrPrintForm = class(TForm)
cbCollate: TCheckBox;
Label1: TLabel;
E1: TEdit;
GroupBox2: TGroupBox;
RB1: TRadioButton;
RB2: TRadioButton;
RB3: TRadioButton;
E2: TEdit;
Panel1: TPanel;
frSpeedButton1: TSpeedButton;
frSpeedButton2: TSpeedButton;
Label2: TLabel;
OkButton: TButton;
CancelButton: TButton;
@ -43,14 +40,13 @@ type
PropButton: TButton;
PrinterSetupDialog1: TPrinterSetupDialog;
Image1: TImage;
E1: TSpinEdit;
procedure CB1DrawItem({%H-}Control: TWinControl; Index: Integer;
ARect: TRect; {%H-}State: TOwnerDrawState);
procedure FormCreate(Sender: TObject);
procedure PropButtonClick(Sender: TObject);
procedure CB1Click(Sender: TObject);
procedure E2Click(Sender: TObject);
procedure frSpeedButton1Click(Sender: TObject);
procedure frSpeedButton2Click(Sender: TObject);
procedure RB3Click(Sender: TObject);
procedure FormDeactivate(Sender: TObject);
private
@ -131,25 +127,6 @@ begin
RB3.Checked := True;
end;
procedure TfrPrintForm.frSpeedButton1Click(Sender: TObject);
var
i: Integer;
begin
i := StrToInt(E1.Text);
Inc(i);
E1.Text := IntToStr(i);
end;
procedure TfrPrintForm.frSpeedButton2Click(Sender: TObject);
var
i: Integer;
begin
i := StrToInt(E1.Text);
Dec(i);
if i <= 0 then i := 1;
E1.Text := IntToStr(i);
end;
procedure TfrPrintForm.RB3Click(Sender: TObject);
begin
E2.SetFocus;

View File

@ -741,7 +741,8 @@ begin
end;
{$ELSE}
frPrintForm := TfrPrintForm.Create(nil);
frPrintForm.E1.Text:=IntToStr(TfrReport(Doc).DefaultCopies);
frPrintForm.E1.Value:=TfrReport(Doc).DefaultCopies;
frPrintForm.cbCollate.Checked:=TfrReport(Doc).DefaultCollate;
with frPrintForm do
begin
if ShowModal = mrOk then
@ -760,7 +761,8 @@ begin
else
Pages := E2.Text;
PrintReport(StrToInt(E1.Text));
TfrReport(Doc).DefaultCollate:=frPrintForm.cbCollate.Checked;
PrintReport(E1.Value);
end;
Free;
end;