RxFPC:fix show preview in TRxDBGridPrint

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6789 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2019-01-11 06:34:01 +00:00
parent 85af6345aa
commit 5d81c2234f
10 changed files with 131 additions and 77 deletions

View File

@ -724,6 +724,10 @@ msgstr "Mostrar color del pie"
msgid "Show grid color" msgid "Show grid color"
msgstr "Mostrar color de la grilla" msgstr "Mostrar color de la grilla"
#: rxdconst.sshowpreview
msgid "Show preview"
msgstr ""
#: rxdconst.sshowreporttitle #: rxdconst.sshowreporttitle
msgid "Show report title" msgid "Show report title"
msgstr "Mostrar título del reporte" msgstr "Mostrar título del reporte"

View File

@ -707,6 +707,10 @@ msgstr "Pokaż kolor stopki"
msgid "Show grid color" msgid "Show grid color"
msgstr "Pokaż kolor tabeli" msgstr "Pokaż kolor tabeli"
#: rxdconst.sshowpreview
msgid "Show preview"
msgstr ""
#: rxdconst.sshowreporttitle #: rxdconst.sshowreporttitle
msgid "Show report title" msgid "Show report title"
msgstr "Pokaż tytuł taportu" msgstr "Pokaż tytuł taportu"

View File

@ -698,6 +698,10 @@ msgstr ""
msgid "Show grid color" msgid "Show grid color"
msgstr "" msgstr ""
#: rxdconst.sshowpreview
msgid "Show preview"
msgstr ""
#: rxdconst.sshowreporttitle #: rxdconst.sshowreporttitle
msgid "Show report title" msgid "Show report title"
msgstr "" msgstr ""

View File

@ -706,6 +706,10 @@ msgstr "Отображать цвет итогов"
msgid "Show grid color" msgid "Show grid color"
msgstr "Отображать цвета таблицы" msgstr "Отображать цвета таблицы"
#: rxdconst.sshowpreview
msgid "Show preview"
msgstr "Предварительный просмотр"
#: rxdconst.sshowreporttitle #: rxdconst.sshowreporttitle
msgid "Show report title" msgid "Show report title"
msgstr "Отображать заголовок отчёта" msgstr "Отображать заголовок отчёта"

View File

@ -712,6 +712,10 @@ msgstr "Показати колір пісумку"
msgid "Show grid color" msgid "Show grid color"
msgstr "Показати колір таблиці" msgstr "Показати колір таблиці"
#: rxdconst.sshowpreview
msgid "Show preview"
msgstr ""
#: rxdconst.sshowreporttitle #: rxdconst.sshowreporttitle
msgid "Show report title" msgid "Show report title"
msgstr "Показати заголовок звіту" msgstr "Показати заголовок звіту"

View File

@ -1747,7 +1747,15 @@ end;
procedure TRxMemoryData.SortOnFieldsEx(const FieldNames: string; procedure TRxMemoryData.SortOnFieldsEx(const FieldNames: string;
CaseInsensitive: Boolean; Asc: array of boolean); CaseInsensitive: Boolean; Asc: array of boolean);
begin begin
(* CreateIndexList(FieldNames);
FCaseInsensitiveSort := CaseInsensitive;
FDescendingSort := Descending;
try
Sort;
except
FreeIndexList;
raise;
end; *)
end; end;
procedure TRxMemoryData.Sort; procedure TRxMemoryData.Sort;

View File

@ -515,6 +515,7 @@ begin
RxDBGridPrintGrid_SetupForm.CheckGroup1.Checked[4]:=rxpoShowReportTitle in FOptions; RxDBGridPrintGrid_SetupForm.CheckGroup1.Checked[4]:=rxpoShowReportTitle in FOptions;
RxDBGridPrintGrid_SetupForm.CheckGroup1.Checked[5]:=rxpoHideZeroValues in FOptions; RxDBGridPrintGrid_SetupForm.CheckGroup1.Checked[5]:=rxpoHideZeroValues in FOptions;
RxDBGridPrintGrid_SetupForm.CheckGroup1.Checked[6]:=rxpoColSpanning in FOptions; RxDBGridPrintGrid_SetupForm.CheckGroup1.Checked[6]:=rxpoColSpanning in FOptions;
RxDBGridPrintGrid_SetupForm.CheckGroup1.Checked[7]:=rxpoShowPreview in FOptions;
Result:=RxDBGridPrintGrid_SetupForm.ShowModal = mrOk; Result:=RxDBGridPrintGrid_SetupForm.ShowModal = mrOk;
if Result then if Result then
@ -549,6 +550,9 @@ begin
if RxDBGridPrintGrid_SetupForm.CheckGroup1.Checked[6] then if RxDBGridPrintGrid_SetupForm.CheckGroup1.Checked[6] then
FOptions:=FOptions + [rxpoColSpanning]; FOptions:=FOptions + [rxpoColSpanning];
if RxDBGridPrintGrid_SetupForm.CheckGroup1.Checked[7] then
FOptions:=FOptions + [rxpoShowPreview];
FShowColumnHeaderOnAllPage:=RxDBGridPrintGrid_SetupForm.CheckBox1.Checked; FShowColumnHeaderOnAllPage:=RxDBGridPrintGrid_SetupForm.CheckBox1.Checked;
end; end;
RxDBGridPrintGrid_SetupForm.Free; RxDBGridPrintGrid_SetupForm.Free;

View File

@ -1,39 +1,40 @@
object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm
Left = 720 Left = 560
Height = 347 Height = 403
Top = 303 Top = 232
Width = 489 Width = 607
Caption = 'Print grid setup' Caption = 'Print grid setup'
ClientHeight = 347 ClientHeight = 403
ClientWidth = 489 ClientWidth = 607
OnCreate = FormCreate OnCreate = FormCreate
Position = poScreenCenter Position = poScreenCenter
LCLVersion = '1.9.0.0' LCLVersion = '2.1.0.0'
object GroupBox1: TGroupBox object GroupBox1: TGroupBox
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner AnchorSideTop.Control = Owner
AnchorSideRight.Control = CheckGroup1 AnchorSideRight.Control = CLabel
AnchorSideBottom.Control = CheckBox1 AnchorSideBottom.Control = CheckBox1
Left = 6 Left = 6
Height = 165 Height = 100
Top = 6 Top = 6
Width = 316 Width = 291
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Top = 6 BorderSpacing.Top = 6
BorderSpacing.Right = 6 BorderSpacing.Right = 6
Caption = 'Page margins' Caption = 'Page margins'
ClientHeight = 144 ClientHeight = 80
ClientWidth = 314 ClientWidth = 289
TabOrder = 0 TabOrder = 0
object Label1: TLabel object Label1: TLabel
AnchorSideLeft.Control = GroupBox1 AnchorSideLeft.Control = GroupBox1
AnchorSideBottom.Control = SpinEdit1 AnchorSideBottom.Control = SpinEdit1
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 6 Left = 6
Height = 20 Height = 19
Top = 23 Top = 18
Width = 24 Width = 25
Anchors = [akLeft, akBottom] Anchors = [akLeft, akBottom]
BorderSpacing.Left = 6 BorderSpacing.Left = 6
Caption = 'Top' Caption = 'Top'
@ -42,8 +43,8 @@ object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm
object SpinEdit1: TSpinEdit object SpinEdit1: TSpinEdit
AnchorSideTop.Control = GroupBox1 AnchorSideTop.Control = GroupBox1
AnchorSideRight.Control = Label5 AnchorSideRight.Control = Label5
Left = 91 Left = 78
Height = 37 Height = 31
Top = 6 Top = 6
Width = 60 Width = 60
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@ -56,9 +57,9 @@ object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm
AnchorSideBottom.Control = SpinEdit2 AnchorSideBottom.Control = SpinEdit2
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 6 Left = 6
Height = 20 Height = 19
Top = 66 Top = 55
Width = 25 Width = 26
Anchors = [akLeft, akBottom] Anchors = [akLeft, akBottom]
BorderSpacing.Left = 6 BorderSpacing.Left = 6
Caption = 'Left' Caption = 'Left'
@ -69,9 +70,9 @@ object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm
AnchorSideTop.Control = SpinEdit1 AnchorSideTop.Control = SpinEdit1
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Label5 AnchorSideRight.Control = Label5
Left = 91 Left = 78
Height = 37 Height = 31
Top = 49 Top = 43
Width = 60 Width = 60
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
BorderSpacing.Around = 6 BorderSpacing.Around = 6
@ -83,8 +84,8 @@ object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm
AnchorSideTop.Control = GroupBox1 AnchorSideTop.Control = GroupBox1
AnchorSideRight.Control = GroupBox1 AnchorSideRight.Control = GroupBox1
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 248 Left = 223
Height = 37 Height = 31
Top = 6 Top = 6
Width = 60 Width = 60
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@ -97,10 +98,10 @@ object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideBottom.Control = SpinEdit3 AnchorSideBottom.Control = SpinEdit3
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 158 Left = 145
Height = 20 Height = 19
Top = 23 Top = 18
Width = 33 Width = 34
Anchors = [akLeft, akBottom] Anchors = [akLeft, akBottom]
Caption = 'Right' Caption = 'Right'
ParentColor = False ParentColor = False
@ -110,10 +111,10 @@ object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideBottom.Control = SpinEdit4 AnchorSideBottom.Control = SpinEdit4
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 158 Left = 145
Height = 20 Height = 19
Top = 66 Top = 55
Width = 47 Width = 49
Anchors = [akLeft, akBottom] Anchors = [akLeft, akBottom]
Caption = 'Bottom' Caption = 'Bottom'
ParentColor = False ParentColor = False
@ -123,9 +124,9 @@ object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = GroupBox1 AnchorSideRight.Control = GroupBox1
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 248 Left = 223
Height = 37 Height = 31
Top = 49 Top = 43
Width = 60 Width = 60
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
BorderSpacing.Around = 6 BorderSpacing.Around = 6
@ -136,7 +137,7 @@ object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm
AnchorSideLeft.Control = GroupBox1 AnchorSideLeft.Control = GroupBox1
AnchorSideLeft.Side = asrCenter AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = GroupBox1 AnchorSideTop.Control = GroupBox1
Left = 157 Left = 144
Height = 1 Height = 1
Top = 0 Top = 0
Width = 1 Width = 1
@ -145,9 +146,9 @@ object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm
end end
object ButtonPanel1: TButtonPanel object ButtonPanel1: TButtonPanel
Left = 6 Left = 6
Height = 46 Height = 42
Top = 295 Top = 355
Width = 477 Width = 595
OKButton.Name = 'OKButton' OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True OKButton.DefaultCaption = True
HelpButton.Name = 'HelpButton' HelpButton.Name = 'HelpButton'
@ -160,14 +161,16 @@ object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm
ShowButtons = [pbOK, pbCancel, pbHelp] ShowButtons = [pbOK, pbCancel, pbHelp]
end end
object CheckGroup1: TCheckGroup object CheckGroup1: TCheckGroup
AnchorSideTop.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideTop.Control = GroupBox1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 328 Left = 6
Height = 201 Height = 124
Top = 6 Top = 112
Width = 155 Width = 595
Anchors = [akTop, akRight] Anchors = [akTop, akLeft, akRight]
AutoFill = True AutoFill = True
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
@ -179,9 +182,10 @@ object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm
ChildSizing.ShrinkHorizontal = crsScaleChilds ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 2
ClientHeight = 180 ClientHeight = 104
ClientWidth = 153 ClientWidth = 593
Columns = 2
Items.Strings = ( Items.Strings = (
'Show title' 'Show title'
'Show footer' 'Show footer'
@ -190,23 +194,30 @@ object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm
'Show report title' 'Show report title'
'Hide zero values' 'Hide zero values'
'Merge cell''s' 'Merge cell''s'
'Show preview'
) )
TabOrder = 2 TabOrder = 2
Data = { Data = {
0700000002020202020202 080000000202020202020202
} }
end end
object RadioGroup1: TRadioGroup object RadioGroup1: TRadioGroup
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = CLabel
AnchorSideTop.Control = CheckBox1 AnchorSideLeft.Side = asrBottom
AnchorSideTop.Side = asrBottom AnchorSideTop.Control = Owner
Left = 6 AnchorSideRight.Control = Owner
Height = 69 AnchorSideRight.Side = asrBottom
Top = 207 AnchorSideBottom.Control = GroupBox1
Width = 107 AnchorSideBottom.Side = asrBottom
Left = 304
Height = 100
Top = 6
Width = 297
Anchors = [akTop, akLeft, akRight, akBottom]
AutoFill = True AutoFill = True
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Top = 6
BorderSpacing.Right = 6
Caption = 'Orientation' Caption = 'Orientation'
ChildSizing.LeftRightSpacing = 6 ChildSizing.LeftRightSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
@ -215,8 +226,8 @@ object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm
ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 1
ClientHeight = 48 ClientHeight = 80
ClientWidth = 105 ClientWidth = 295
Items.Strings = ( Items.Strings = (
'Portrait' 'Portrait'
'Landscape' 'Landscape'
@ -224,14 +235,13 @@ object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm
TabOrder = 3 TabOrder = 3
end end
object Label6: TLabel object Label6: TLabel
AnchorSideLeft.Control = RadioGroup1 AnchorSideLeft.Control = Owner
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = CheckBox1 AnchorSideTop.Control = CheckBox1
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 119 Left = 6
Height = 20 Height = 19
Top = 207 Top = 271
Width = 72 Width = 73
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'Report title' Caption = 'Report title'
ParentColor = False ParentColor = False
@ -242,27 +252,36 @@ object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 125 Left = 12
Height = 37 Height = 31
Top = 233 Top = 296
Width = 358 Width = 589
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6 BorderSpacing.Around = 6
TabOrder = 4 TabOrder = 4
end end
object CheckBox1: TCheckBox object CheckBox1: TCheckBox
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideTop.Control = CheckGroup1
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = CheckGroup1 AnchorSideRight.Control = CheckGroup1
AnchorSideBottom.Control = CheckGroup1
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 6 Left = 6
Height = 24 Height = 23
Top = 177 Top = 242
Width = 235 Width = 236
Anchors = [akLeft, akBottom]
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'Show column header on all page' Caption = 'Show column header on all page'
TabOrder = 5 TabOrder = 5
end end
object CLabel: TLabel
AnchorSideLeft.Control = Owner
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = Owner
Left = 303
Height = 1
Top = 0
Width = 1
ParentColor = False
end
end end

View File

@ -55,6 +55,7 @@ type
Label4: TLabel; Label4: TLabel;
Label5: TLabel; Label5: TLabel;
Label6: TLabel; Label6: TLabel;
CLabel: TLabel;
RadioGroup1: TRadioGroup; RadioGroup1: TRadioGroup;
SpinEdit1: TSpinEdit; SpinEdit1: TSpinEdit;
SpinEdit2: TSpinEdit; SpinEdit2: TSpinEdit;
@ -85,6 +86,7 @@ begin
CheckGroup1.Items[4]:=sShowReportTitle; CheckGroup1.Items[4]:=sShowReportTitle;
CheckGroup1.Items[5]:=sHideZeroValues; CheckGroup1.Items[5]:=sHideZeroValues;
CheckGroup1.Items[6]:=sMergeCells; CheckGroup1.Items[6]:=sMergeCells;
CheckGroup1.Items[7]:=sShowPreview;
GroupBox1.Caption:=sPageMargins; GroupBox1.Caption:=sPageMargins;

View File

@ -209,6 +209,7 @@ resourcestring
sCompressFonts = 'Compress fonts'; sCompressFonts = 'Compress fonts';
sCompressImages = 'Compress images'; sCompressImages = 'Compress images';
sUseRawJPEG = 'Use raw JPEG'; sUseRawJPEG = 'Use raw JPEG';
sShowPreview = 'Show preview';
sShowTitle = 'Show column title'; sShowTitle = 'Show column title';
sShowFooter = 'Show footer'; sShowFooter = 'Show footer';