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
#, 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 '<>'"
#: rxdconst.sexprexpected
@ -143,6 +143,10 @@ msgstr "Campo '%s' debe tener un valor"
msgid "Type mismatch for field '%s', expecting: %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
msgid "Enter you user name and password"
msgstr "Entre su nombre de usuario y clave"

View File

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

View File

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

View File

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

View File

@ -44,7 +44,8 @@ type
rxpoShowFooter,
rxpoShowGridColor,
rxpoShowFooterColor,
rxpoShowReportTitle
rxpoShowReportTitle,
rxpoHideZeroValues
);
TRxDBGridPrintOptions = set of TRxDBGridPrintOption;
@ -375,7 +376,11 @@ begin
J := F.Col.KeyList.IndexOf(S);
if (J >= 0) and (J < F.Col.PickList.Count) then
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;
TfrMemoView(View).Alignment:=F.Col.Alignment;
@ -480,6 +485,7 @@ begin
RxDBGridPrintGrid_SetupForm.CheckGroup1.Checked[2]:=rxpoShowFooterColor in FOptions;
RxDBGridPrintGrid_SetupForm.CheckGroup1.Checked[3]:=rxpoShowGridColor in FOptions;
RxDBGridPrintGrid_SetupForm.CheckGroup1.Checked[4]:=rxpoShowReportTitle in FOptions;
RxDBGridPrintGrid_SetupForm.CheckGroup1.Checked[5]:=rxpoHideZeroValues in FOptions;
Result:=RxDBGridPrintGrid_SetupForm.ShowModal = mrOk;
if Result then
@ -508,6 +514,9 @@ begin
if RxDBGridPrintGrid_SetupForm.CheckGroup1.Checked[4] then
FOptions:=FOptions + [rxpoShowReportTitle];
if RxDBGridPrintGrid_SetupForm.CheckGroup1.Checked[5] then
FOptions:=FOptions + [rxpoHideZeroValues];
FShowColumnHeaderOnAllPage:=RxDBGridPrintGrid_SetupForm.CheckBox1.Checked;
end;
RxDBGridPrintGrid_SetupForm.Free;

View File

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

View File

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

View File

@ -41,7 +41,7 @@ resourcestring
SLocalDatabase = 'Unable complete this operation on local dataset';
SRetryLogin = 'Retry to connect with database?';
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';
SCaptureFilter = 'Control locked by filter';
SNotCaptureFilter = 'Control need locked by filter';
@ -198,6 +198,8 @@ resourcestring
sShowGridColor = 'Show grid color';
sShowReportTitle = 'Show report title';
sPrintGrid = 'Print grid';
sHideZeroValues = 'Hide zero values';