* Add FieldIsNull built-in function

git-svn-id: trunk@57526 -
This commit is contained in:
michael 2018-03-18 12:00:26 +00:00
parent 4c12df05e8
commit d396966a7b
2 changed files with 31 additions and 4 deletions

View File

@ -49,8 +49,11 @@ object ReportDataDisplay: TReportDataDisplay
Width = 321 Width = 321
Align = alClient Align = alClient
DragMode = dmAutomatic DragMode = dmAutomatic
ReadOnly = True
TabOrder = 0 TabOrder = 0
OnMouseDown = TVVariablesMouseDown
OnStartDrag = LBVariablesStartDrag OnStartDrag = LBVariablesStartDrag
Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw]
end end
end end
object TabSheet1: TTabSheet object TabSheet1: TTabSheet
@ -59,9 +62,9 @@ object ReportDataDisplay: TReportDataDisplay
ClientWidth = 321 ClientWidth = 321
object TVFunctions: TTreeView object TVFunctions: TTreeView
Left = 0 Left = 0
Height = 205 Height = 242
Top = 0 Top = 0
Width = 314 Width = 321
Align = alClient Align = alClient
DragMode = dmAutomatic DragMode = dmAutomatic
HideSelection = False HideSelection = False

View File

@ -38,12 +38,14 @@ type
procedure TVDataMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure TVDataMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure TVDataStartDrag(Sender: TObject; var DragObject: TDragObject); procedure TVDataStartDrag(Sender: TObject; var DragObject: TDragObject);
procedure TVFunctionsStartDrag(Sender: TObject; var DragObject: TDragObject); procedure TVFunctionsStartDrag(Sender: TObject; var DragObject: TDragObject);
procedure TVVariablesMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
private private
FPageCount : TFPExprIdentifierDef; FPageCount : TFPExprIdentifierDef;
FIdentifiers: TFPExprIdentifierDefs; FIdentifiers: TFPExprIdentifierDefs;
FUserVariables : TTreeNode; FUserVariables : TTreeNode;
FBuiltinVariables : TTreeNode; FBuiltinVariables : TTreeNode;
FDataLastDown : TPoint; FDataLastDown : TPoint;
FVariablesLastDown : TPoint;
FReport: TFPReport; FReport: TFPReport;
FReportData: TFPReportDataCollection; FReportData: TFPReportDataCollection;
@ -81,10 +83,10 @@ Var
begin begin
DragObject:=Nil; DragObject:=Nil;
if (TVData.Selected=Nil) and (FDataLastDown.Y<>0) then if (FDataLastDown.Y<>0) then
begin begin
N:=TVData.GetNodeAt(FDataLastDown.X,FDataLastDown.Y); N:=TVData.GetNodeAt(FDataLastDown.X,FDataLastDown.Y);
if N<>Nil then if (N<>Nil) and (TVData.Selected<>N) then
TVData.Selected:=N; TVData.Selected:=N;
end; end;
if (TVData.Selected<>Nil) then if (TVData.Selected<>Nil) then
@ -142,6 +144,11 @@ begin
end; end;
end; end;
procedure TReportDataDisplay.TVVariablesMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
FVariablesLastDown:=Point(X,Y);
end;
procedure TReportDataDisplay.LBVariablesStartDrag(Sender: TObject; procedure TReportDataDisplay.LBVariablesStartDrag(Sender: TObject;
var DragObject: TDragObject); var DragObject: TDragObject);
@ -149,10 +156,25 @@ Var
S : String; S : String;
M : TMemoDragDrop; M : TMemoDragDrop;
O : TObject; O : TObject;
N : TTreeNode;
begin begin
if (FVariablesLastDown.Y<>0) then
begin
N:=TVData.GetNodeAt(FVariablesLastDown.X,FVariablesLastDown.Y);
if Assigned(N) then
Writeln('Checking ',N.Text)
else
Writeln('Not on node');
if (N<>Nil) and (TVVariables.Selected<>N) then
begin
Writeln('Correcting ',N.Text);
TVVariables.Selected:=N;
end;
end;
if (TVVariables.Selected<>Nil) then if (TVVariables.Selected<>Nil) then
begin begin
Writeln('Actual ',TVVariables.Selected.Text);
O:=TObject(TVVariables.Selected.Data); O:=TObject(TVVariables.Selected.Data);
if Assigned(o) then if Assigned(o) then
if (O.InheritsFrom(TFPReportVariable)) then if (O.InheritsFrom(TFPReportVariable)) then
@ -166,6 +188,8 @@ begin
DragObject:=M; DragObject:=M;
end; end;
end; end;
FVariablesLastDown.X:=0;
FVariablesLastDown.Y:=0;
end; end;
procedure TReportDataDisplay.TVDataMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure TReportDataDisplay.TVDataMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);