You've already forked lazarus-ccr
RxFPC:RxDBGrid fix error filter data on string field with filter = IS NULL
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4511 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -4998,7 +4998,7 @@ begin
|
||||
DHS.FreeBookmark(P);
|
||||
DHS.FreeBookmark(P_26);
|
||||
{$ELSE}
|
||||
if DHS.CompareBookmarks(DHS.Bookmark, P)<>0 then
|
||||
if DHS.BookmarkValid(P) and (DHS.CompareBookmarks(DHS.Bookmark, P)<>0) then
|
||||
DHS.Bookmark:=P; //workaround for fix navigation problem
|
||||
{$ENDIF}
|
||||
|
||||
|
@ -9,14 +9,14 @@ object rxFilterByForm: TrxFilterByForm
|
||||
ClientWidth = 644
|
||||
OnCreate = FormCreate
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.1'
|
||||
LCLVersion = '1.7'
|
||||
object Label1: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 6
|
||||
Height = 15
|
||||
Height = 20
|
||||
Top = 6
|
||||
Width = 234
|
||||
Width = 211
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Select filter expression for data'
|
||||
Font.Style = [fsBold]
|
||||
@ -28,9 +28,9 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideTop.Control = Label1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 15
|
||||
Top = 27
|
||||
Width = 62
|
||||
Height = 20
|
||||
Top = 32
|
||||
Width = 58
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'On field:'
|
||||
Font.Color = clRed
|
||||
@ -42,9 +42,9 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideTop.Control = Label1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 168
|
||||
Height = 15
|
||||
Top = 27
|
||||
Width = 83
|
||||
Height = 20
|
||||
Top = 32
|
||||
Width = 76
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Operation :'
|
||||
Font.Color = clRed
|
||||
@ -56,9 +56,9 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideTop.Control = Label1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 271
|
||||
Height = 15
|
||||
Top = 27
|
||||
Width = 88
|
||||
Height = 20
|
||||
Top = 32
|
||||
Width = 80
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Conditions :'
|
||||
Font.Color = clRed
|
||||
@ -71,9 +71,9 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideTop.Control = Label1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 533
|
||||
Height = 15
|
||||
Top = 27
|
||||
Width = 74
|
||||
Height = 20
|
||||
Top = 32
|
||||
Width = 66
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Operand :'
|
||||
Font.Color = clRed
|
||||
@ -87,9 +87,9 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideBottom.Control = ComboBox25
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 527
|
||||
Height = 15
|
||||
Top = 340
|
||||
Width = 33
|
||||
Height = 20
|
||||
Top = 408
|
||||
Width = 29
|
||||
Anchors = [akLeft, akBottom]
|
||||
Caption = 'End.'
|
||||
Font.Color = clRed
|
||||
@ -102,8 +102,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideTop.Control = Label2
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 27
|
||||
Top = 48
|
||||
Height = 34
|
||||
Top = 58
|
||||
Width = 153
|
||||
BorderSpacing.Around = 6
|
||||
ItemHeight = 0
|
||||
@ -114,8 +114,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideTop.Control = Label2
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 168
|
||||
Height = 27
|
||||
Top = 48
|
||||
Height = 34
|
||||
Top = 58
|
||||
Width = 96
|
||||
BorderSpacing.Around = 6
|
||||
DropDownCount = 9
|
||||
@ -129,8 +129,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = ComboBox3
|
||||
Left = 271
|
||||
Height = 25
|
||||
Top = 48
|
||||
Height = 30
|
||||
Top = 58
|
||||
Width = 250
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Around = 6
|
||||
@ -143,8 +143,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 527
|
||||
Height = 27
|
||||
Top = 48
|
||||
Height = 34
|
||||
Top = 58
|
||||
Width = 111
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Around = 6
|
||||
@ -163,8 +163,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = ComboBox1
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 27
|
||||
Top = 83
|
||||
Height = 34
|
||||
Top = 100
|
||||
Width = 149
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
@ -181,8 +181,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = ComboBox2
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 168
|
||||
Height = 27
|
||||
Top = 81
|
||||
Height = 34
|
||||
Top = 98
|
||||
Width = 96
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
@ -199,8 +199,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = ComboBox3
|
||||
Left = 270
|
||||
Height = 25
|
||||
Top = 81
|
||||
Height = 30
|
||||
Top = 98
|
||||
Width = 251
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
@ -214,8 +214,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 527
|
||||
Height = 27
|
||||
Top = 81
|
||||
Height = 34
|
||||
Top = 98
|
||||
Width = 111
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Around = 6
|
||||
@ -234,8 +234,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = ComboBox1
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 27
|
||||
Top = 118
|
||||
Height = 34
|
||||
Top = 142
|
||||
Width = 149
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
@ -252,8 +252,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = ComboBox2
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 168
|
||||
Height = 27
|
||||
Top = 116
|
||||
Height = 34
|
||||
Top = 140
|
||||
Width = 96
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
@ -270,8 +270,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = ComboBox3
|
||||
Left = 270
|
||||
Height = 25
|
||||
Top = 116
|
||||
Height = 30
|
||||
Top = 140
|
||||
Width = 251
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
@ -285,8 +285,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 527
|
||||
Height = 27
|
||||
Top = 116
|
||||
Height = 34
|
||||
Top = 140
|
||||
Width = 111
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Around = 6
|
||||
@ -305,8 +305,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = ComboBox1
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 27
|
||||
Top = 153
|
||||
Height = 34
|
||||
Top = 184
|
||||
Width = 149
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
@ -323,8 +323,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = ComboBox2
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 168
|
||||
Height = 27
|
||||
Top = 151
|
||||
Height = 34
|
||||
Top = 182
|
||||
Width = 96
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
@ -341,8 +341,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = ComboBox3
|
||||
Left = 270
|
||||
Height = 25
|
||||
Top = 151
|
||||
Height = 30
|
||||
Top = 182
|
||||
Width = 251
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
@ -356,8 +356,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 527
|
||||
Height = 27
|
||||
Top = 151
|
||||
Height = 34
|
||||
Top = 182
|
||||
Width = 111
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Around = 6
|
||||
@ -376,8 +376,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = ComboBox1
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 27
|
||||
Top = 188
|
||||
Height = 34
|
||||
Top = 226
|
||||
Width = 149
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
@ -394,8 +394,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = ComboBox2
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 168
|
||||
Height = 27
|
||||
Top = 186
|
||||
Height = 34
|
||||
Top = 224
|
||||
Width = 96
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
@ -412,8 +412,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = ComboBox3
|
||||
Left = 270
|
||||
Height = 25
|
||||
Top = 186
|
||||
Height = 30
|
||||
Top = 224
|
||||
Width = 251
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
@ -427,8 +427,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 527
|
||||
Height = 27
|
||||
Top = 186
|
||||
Height = 34
|
||||
Top = 224
|
||||
Width = 111
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Around = 6
|
||||
@ -447,8 +447,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = ComboBox1
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 27
|
||||
Top = 223
|
||||
Height = 34
|
||||
Top = 268
|
||||
Width = 149
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
@ -465,8 +465,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = ComboBox2
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 168
|
||||
Height = 27
|
||||
Top = 221
|
||||
Height = 34
|
||||
Top = 266
|
||||
Width = 96
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
@ -483,8 +483,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = ComboBox3
|
||||
Left = 270
|
||||
Height = 25
|
||||
Top = 221
|
||||
Height = 30
|
||||
Top = 266
|
||||
Width = 251
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
@ -498,8 +498,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 527
|
||||
Height = 27
|
||||
Top = 221
|
||||
Height = 34
|
||||
Top = 266
|
||||
Width = 111
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Around = 6
|
||||
@ -518,8 +518,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = ComboBox1
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 27
|
||||
Top = 258
|
||||
Height = 34
|
||||
Top = 310
|
||||
Width = 149
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
@ -536,8 +536,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = ComboBox2
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 168
|
||||
Height = 27
|
||||
Top = 256
|
||||
Height = 34
|
||||
Top = 308
|
||||
Width = 96
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
@ -554,8 +554,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = ComboBox3
|
||||
Left = 270
|
||||
Height = 25
|
||||
Top = 256
|
||||
Height = 30
|
||||
Top = 308
|
||||
Width = 251
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
@ -569,8 +569,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 527
|
||||
Height = 27
|
||||
Top = 256
|
||||
Height = 34
|
||||
Top = 308
|
||||
Width = 111
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Around = 6
|
||||
@ -589,8 +589,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = ComboBox1
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 27
|
||||
Top = 293
|
||||
Height = 34
|
||||
Top = 352
|
||||
Width = 149
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
@ -607,8 +607,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = ComboBox2
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 168
|
||||
Height = 27
|
||||
Top = 291
|
||||
Height = 34
|
||||
Top = 350
|
||||
Width = 96
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
@ -625,8 +625,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = ComboBox3
|
||||
Left = 270
|
||||
Height = 25
|
||||
Top = 291
|
||||
Height = 30
|
||||
Top = 350
|
||||
Width = 251
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
@ -640,8 +640,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 527
|
||||
Height = 27
|
||||
Top = 291
|
||||
Height = 34
|
||||
Top = 350
|
||||
Width = 111
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Around = 6
|
||||
@ -660,8 +660,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = ComboBox1
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 8
|
||||
Height = 27
|
||||
Top = 328
|
||||
Height = 34
|
||||
Top = 394
|
||||
Width = 149
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
@ -678,8 +678,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = ComboBox2
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 168
|
||||
Height = 27
|
||||
Top = 326
|
||||
Height = 34
|
||||
Top = 392
|
||||
Width = 96
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
@ -696,8 +696,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = ComboBox3
|
||||
Left = 270
|
||||
Height = 25
|
||||
Top = 326
|
||||
Height = 30
|
||||
Top = 392
|
||||
Width = 251
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
@ -710,8 +710,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 27
|
||||
Top = 412
|
||||
Height = 34
|
||||
Top = 405
|
||||
Width = 58
|
||||
Anchors = [akLeft, akBottom]
|
||||
BorderSpacing.Around = 6
|
||||
@ -729,10 +729,10 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 593
|
||||
Height = 25
|
||||
Top = 414
|
||||
Width = 45
|
||||
Left = 589
|
||||
Height = 32
|
||||
Top = 407
|
||||
Width = 49
|
||||
Anchors = [akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
@ -745,10 +745,10 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = Button1
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 534
|
||||
Height = 25
|
||||
Top = 414
|
||||
Width = 53
|
||||
Left = 527
|
||||
Height = 32
|
||||
Top = 407
|
||||
Width = 56
|
||||
Anchors = [akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
@ -761,10 +761,10 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = Button2
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 453
|
||||
Height = 25
|
||||
Top = 414
|
||||
Width = 75
|
||||
Left = 440
|
||||
Height = 32
|
||||
Top = 407
|
||||
Width = 81
|
||||
Anchors = [akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
|
@ -333,6 +333,9 @@ Begin
|
||||
FilterStr := FilterStr+Combo_3[X-1].Text+' ';
|
||||
|
||||
C:=FGrid.ColumnByCaption(Combo_1[X].Text);
|
||||
if Pos('NULL', Combo_2[X].Text) > 0 then
|
||||
FilterStr := FilterStr+'('+C.FieldName+Combo_2[X].Text+') '
|
||||
else
|
||||
case C.Field.DataType of
|
||||
ftDateTime ,
|
||||
ftDate : FilterStr := FilterStr+'('+C.FieldName+Combo_2[X].Text+Char(39)+Copy(Edit_1[X].Text,7,4)+Copy(Edit_1[X].Text,3,4)+Copy(Edit_1[X].Text,1,2)+Copy(Edit_1[X].Text,11,9)+Char(39)+') ';
|
||||
|
Reference in New Issue
Block a user