TRxDBGridPrint - new option - rxpoHideZeroValues

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3453 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2014-08-08 12:40:55 +00:00
parent 53bb7bd316
commit c88517cf7b
8 changed files with 50 additions and 23 deletions

View File

@ -95,8 +95,8 @@ msgstr "Campo '%s' no usado en expresión de filtro"
#: rxdconst.sexprbadnulltest #: rxdconst.sexprbadnulltest
#, fuzzy #, fuzzy
#| msgid "NULL-values enabled in '=' и '<>'" #| msgid "NULL-values enabled in '=' и '<>'"
msgid "NULL-values enabled in '=' и '<>'" msgid "NULL-values enabled in '=' and '<>'"
msgstr "Valor nulo habilitado en '=' y '<>'" msgstr "Valor nulo habilitado en '=' y '<>'"
#: rxdconst.sexprexpected #: rxdconst.sexprexpected
@ -143,6 +143,10 @@ msgstr "Campo '%s' debe tener un valor"
msgid "Type mismatch for field '%s', expecting: %s actual: %s" msgid "Type mismatch for field '%s', expecting: %s actual: %s"
msgstr "Tipo no corresponde para el campo '%s', se esperaba: %s actual: %s" msgstr "Tipo no corresponde para el campo '%s', se esperaba: %s actual: %s"
#: rxdconst.shidezerovalues
msgid "Hide zero values"
msgstr ""
#: rxdconst.shintlabel #: rxdconst.shintlabel
msgid "Enter you user name and password" msgid "Enter you user name and password"
msgstr "Entre su nombre de usuario y clave" msgstr "Entre su nombre de usuario y clave"

View File

@ -94,7 +94,7 @@ msgid "Field '%s' not used in filter expression"
msgstr "" msgstr ""
#: rxdconst.sexprbadnulltest #: rxdconst.sexprbadnulltest
msgid "NULL-values enabled in '=' и '<>'" msgid "NULL-values enabled in '=' and '<>'"
msgstr "" msgstr ""
#: rxdconst.sexprexpected #: rxdconst.sexprexpected
@ -141,6 +141,10 @@ msgstr ""
msgid "Type mismatch for field '%s', expecting: %s actual: %s" msgid "Type mismatch for field '%s', expecting: %s actual: %s"
msgstr "" msgstr ""
#: rxdconst.shidezerovalues
msgid "Hide zero values"
msgstr ""
#: rxdconst.shintlabel #: rxdconst.shintlabel
msgid "Enter you user name and password" msgid "Enter you user name and password"
msgstr "" msgstr ""

View File

@ -94,9 +94,7 @@ msgid "Field '%s' not used in filter expression"
msgstr "Поле '%s' не может быть использовано в выражении фильтрации" msgstr "Поле '%s' не может быть использовано в выражении фильтрации"
#: rxdconst.sexprbadnulltest #: rxdconst.sexprbadnulltest
#, fuzzy msgid "NULL-values enabled in '=' and '<>'"
#| msgid "NULL-values enabled in '=' и '<>'"
msgid "NULL-values enabled in '=' и '<>'"
msgstr "NULL-значения разрешены только в выражениях '=' и '<>'" msgstr "NULL-значения разрешены только в выражениях '=' и '<>'"
#: rxdconst.sexprexpected #: rxdconst.sexprexpected
@ -143,6 +141,10 @@ msgstr "Поле '%s' ожидает значение"
msgid "Type mismatch for field '%s', expecting: %s actual: %s" msgid "Type mismatch for field '%s', expecting: %s actual: %s"
msgstr "Несоответсвие типов для поля '%s', необходимо: %s введено: %s" msgstr "Несоответсвие типов для поля '%s', необходимо: %s введено: %s"
#: rxdconst.shidezerovalues
msgid "Hide zero values"
msgstr "Скрывать нулевые значения"
#: rxdconst.shintlabel #: rxdconst.shintlabel
msgid "Enter you user name and password" msgid "Enter you user name and password"
msgstr "Введите ваше имя и пароль" msgstr "Введите ваше имя и пароль"

View File

@ -104,8 +104,8 @@ msgstr "Поле '%s' не може бути використане в вира
#: rxdconst.sexprbadnulltest #: rxdconst.sexprbadnulltest
#, fuzzy #, fuzzy
#| msgid "NULL-values enabled in '=' и '<>'" #| msgid "NULL-values enabled in '=' и '<>'"
msgid "NULL-values enabled in '=' и '<>'" msgid "NULL-values enabled in '=' and '<>'"
msgstr "NULL-значення дозволені тільки у виразах '=' і '<>'" msgstr "NULL-значення дозволені тільки у виразах '=' і '<>'"
#: rxdconst.sexprexpected #: rxdconst.sexprexpected
@ -152,6 +152,10 @@ msgstr "Поле '%s' очікує значення"
msgid "Type mismatch for field '%s', expecting: %s actual: %s" msgid "Type mismatch for field '%s', expecting: %s actual: %s"
msgstr "Несоответсвие типов для поля '%s', необходимо: %s введено: %s" msgstr "Несоответсвие типов для поля '%s', необходимо: %s введено: %s"
#: rxdconst.shidezerovalues
msgid "Hide zero values"
msgstr ""
#: rxdconst.shintlabel #: rxdconst.shintlabel
msgid "Enter you user name and password" msgid "Enter you user name and password"
msgstr "Введіть ваші ім'я користувача та пароль" msgstr "Введіть ваші ім'я користувача та пароль"

View File

@ -44,7 +44,8 @@ type
rxpoShowFooter, rxpoShowFooter,
rxpoShowGridColor, rxpoShowGridColor,
rxpoShowFooterColor, rxpoShowFooterColor,
rxpoShowReportTitle rxpoShowReportTitle,
rxpoHideZeroValues
); );
TRxDBGridPrintOptions = set of TRxDBGridPrintOption; TRxDBGridPrintOptions = set of TRxDBGridPrintOption;
@ -375,7 +376,11 @@ begin
J := F.Col.KeyList.IndexOf(S); J := F.Col.KeyList.IndexOf(S);
if (J >= 0) and (J < F.Col.PickList.Count) then if (J >= 0) and (J < F.Col.PickList.Count) then
S := F.Col.PickList[j]; S := F.Col.PickList[j];
end; end
else
if (rxpoHideZeroValues in FOptions) and Assigned(F.Col.Field) and (F.Col.Field.DataType in [ftSmallint, ftInteger, ftWord,
ftFloat, ftCurrency, ftLargeint]) and (F.Col.Field.AsFloat = 0) then
S:='';
Memo[0] := S; Memo[0] := S;
TfrMemoView(View).Alignment:=F.Col.Alignment; TfrMemoView(View).Alignment:=F.Col.Alignment;
@ -480,6 +485,7 @@ begin
RxDBGridPrintGrid_SetupForm.CheckGroup1.Checked[2]:=rxpoShowFooterColor in FOptions; RxDBGridPrintGrid_SetupForm.CheckGroup1.Checked[2]:=rxpoShowFooterColor in FOptions;
RxDBGridPrintGrid_SetupForm.CheckGroup1.Checked[3]:=rxpoShowGridColor in FOptions; RxDBGridPrintGrid_SetupForm.CheckGroup1.Checked[3]:=rxpoShowGridColor in FOptions;
RxDBGridPrintGrid_SetupForm.CheckGroup1.Checked[4]:=rxpoShowReportTitle in FOptions; RxDBGridPrintGrid_SetupForm.CheckGroup1.Checked[4]:=rxpoShowReportTitle in FOptions;
RxDBGridPrintGrid_SetupForm.CheckGroup1.Checked[5]:=rxpoHideZeroValues in FOptions;
Result:=RxDBGridPrintGrid_SetupForm.ShowModal = mrOk; Result:=RxDBGridPrintGrid_SetupForm.ShowModal = mrOk;
if Result then if Result then
@ -508,6 +514,9 @@ begin
if RxDBGridPrintGrid_SetupForm.CheckGroup1.Checked[4] then if RxDBGridPrintGrid_SetupForm.CheckGroup1.Checked[4] then
FOptions:=FOptions + [rxpoShowReportTitle]; FOptions:=FOptions + [rxpoShowReportTitle];
if RxDBGridPrintGrid_SetupForm.CheckGroup1.Checked[5] then
FOptions:=FOptions + [rxpoHideZeroValues];
FShowColumnHeaderOnAllPage:=RxDBGridPrintGrid_SetupForm.CheckBox1.Checked; FShowColumnHeaderOnAllPage:=RxDBGridPrintGrid_SetupForm.CheckBox1.Checked;
end; end;
RxDBGridPrintGrid_SetupForm.Free; RxDBGridPrintGrid_SetupForm.Free;

View File

@ -1,10 +1,10 @@
object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm
Left = 720 Left = 720
Height = 317 Height = 344
Top = 303 Top = 303
Width = 468 Width = 468
Caption = 'Print grid setup' Caption = 'Print grid setup'
ClientHeight = 317 ClientHeight = 344
ClientWidth = 468 ClientWidth = 468
OnCreate = FormCreate OnCreate = FormCreate
Position = poScreenCenter Position = poScreenCenter
@ -16,7 +16,7 @@ object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm
AnchorSideBottom.Control = CheckGroup1 AnchorSideBottom.Control = CheckGroup1
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 6 Left = 6
Height = 150 Height = 173
Top = 6 Top = 6
Width = 294 Width = 294
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
@ -24,7 +24,7 @@ object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm
BorderSpacing.Top = 6 BorderSpacing.Top = 6
BorderSpacing.Right = 6 BorderSpacing.Right = 6
Caption = 'Page margins' Caption = 'Page margins'
ClientHeight = 127 ClientHeight = 150
ClientWidth = 290 ClientWidth = 290
TabOrder = 0 TabOrder = 0
object Label1: TLabel object Label1: TLabel
@ -147,7 +147,7 @@ object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm
object ButtonPanel1: TButtonPanel object ButtonPanel1: TButtonPanel
Left = 6 Left = 6
Height = 41 Height = 41
Top = 270 Top = 297
Width = 456 Width = 456
OKButton.Name = 'OKButton' OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True OKButton.DefaultCaption = True
@ -165,7 +165,7 @@ object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm
AnchorSideRight.Control = Owner AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 306 Left = 306
Height = 150 Height = 173
Top = 6 Top = 6
Width = 156 Width = 156
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
@ -181,7 +181,7 @@ object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm
ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 1
ClientHeight = 127 ClientHeight = 150
ClientWidth = 152 ClientWidth = 152
Items.Strings = ( Items.Strings = (
'Show title' 'Show title'
@ -189,10 +189,11 @@ object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm
'Show footer color' 'Show footer color'
'Show grid color' 'Show grid color'
'Show report title' 'Show report title'
'Hide zero values'
) )
TabOrder = 2 TabOrder = 2
Data = { Data = {
050000000202020202 06000000020202020202
} }
end end
object RadioGroup1: TRadioGroup object RadioGroup1: TRadioGroup
@ -201,7 +202,7 @@ object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 6 Left = 6
Height = 69 Height = 69
Top = 162 Top = 185
Width = 106 Width = 106
AutoFill = True AutoFill = True
AutoSize = True AutoSize = True
@ -229,7 +230,7 @@ object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 118 Left = 118
Height = 21 Height = 21
Top = 162 Top = 185
Width = 75 Width = 75
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'Report title' Caption = 'Report title'
@ -243,7 +244,7 @@ object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 124 Left = 124
Height = 31 Height = 31
Top = 189 Top = 212
Width = 338 Width = 338
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6 BorderSpacing.Around = 6
@ -255,7 +256,7 @@ object RxDBGridPrintGrid_SetupForm: TRxDBGridPrintGrid_SetupForm
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 6 Left = 6
Height = 23 Height = 23
Top = 237 Top = 260
Width = 233 Width = 233
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'Show column header on all page' Caption = 'Show column header on all page'

View File

@ -83,6 +83,7 @@ begin
CheckGroup1.Items[2]:=sShowFooterColor; CheckGroup1.Items[2]:=sShowFooterColor;
CheckGroup1.Items[3]:=sShowGridColor; CheckGroup1.Items[3]:=sShowGridColor;
CheckGroup1.Items[4]:=sShowReportTitle; CheckGroup1.Items[4]:=sShowReportTitle;
CheckGroup1.Items[5]:=sHideZeroValues;
GroupBox1.Caption:=sPageMargins; GroupBox1.Caption:=sPageMargins;

View File

@ -41,7 +41,7 @@ resourcestring
SLocalDatabase = 'Unable complete this operation on local dataset'; SLocalDatabase = 'Unable complete this operation on local dataset';
SRetryLogin = 'Retry to connect with database?'; SRetryLogin = 'Retry to connect with database?';
SExprNotBoolean = 'Field ''%s'' is not boolean'; SExprNotBoolean = 'Field ''%s'' is not boolean';
SExprBadNullTest = 'NULL-values enabled in ''='' и ''<>'''; SExprBadNullTest = 'NULL-values enabled in ''='' and ''<>''';
SExprBadField = 'Field ''%s'' not used in filter expression'; SExprBadField = 'Field ''%s'' not used in filter expression';
SCaptureFilter = 'Control locked by filter'; SCaptureFilter = 'Control locked by filter';
SNotCaptureFilter = 'Control need locked by filter'; SNotCaptureFilter = 'Control need locked by filter';
@ -198,6 +198,8 @@ resourcestring
sShowGridColor = 'Show grid color'; sShowGridColor = 'Show grid color';
sShowReportTitle = 'Show report title'; sShowReportTitle = 'Show report title';
sPrintGrid = 'Print grid'; sPrintGrid = 'Print grid';
sHideZeroValues = 'Hide zero values';