From b90b0b5960949d9d9475390d24a36b9eb3640353 Mon Sep 17 00:00:00 2001 From: alexs75 Date: Sun, 26 Mar 2017 16:13:34 +0000 Subject: [PATCH] RxFPC:fix problem on calc values for footer row git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5819 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/rx/trunk/rxdb/rxdbgrid.pas | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/rx/trunk/rxdb/rxdbgrid.pas b/components/rx/trunk/rxdb/rxdbgrid.pas index b03d34bd6..dcbf79a71 100644 --- a/components/rx/trunk/rxdb/rxdbgrid.pas +++ b/components/rx/trunk/rxdb/rxdbgrid.pas @@ -1290,7 +1290,7 @@ begin FCountRec:=0; if (ValueType in [fvtMin, fvtMax]) and (TRxDBGrid( - FOwner.Grid).DataSource.DataSet.RecordCount <> 0) then + FOwner.Grid).DataSource.DataSet.RecordCount <> 0) and (FFieldName<>'') then begin F := TRxDBGrid(FOwner.Grid).DataSource.DataSet.FieldByName(FFieldName); if (Assigned(F)) and not (F.IsNull) then @@ -1305,7 +1305,7 @@ procedure TRxColumnFooterItem.UpdateTestValue; var F: TField; begin - if ValueType in [fvtSum, fvtAvg, fvtMax, fvtMin] then + if (ValueType in [fvtSum, fvtAvg, fvtMax, fvtMin]) and (FFieldName<>'') then begin F := TRxDBGrid(FOwner.Grid).DataSource.DataSet.FindField(FFieldName); if Assigned(F) then @@ -1335,7 +1335,7 @@ var F: TField; begin Result := True; - if ValueType in [fvtSum, fvtAvg, fvtMax, fvtMin] then + if (ValueType in [fvtSum, fvtAvg, fvtMax, fvtMin]) and (FFieldName<>'') then begin F := TRxDBGrid(FOwner.Grid).DataSource.DataSet.FieldByName(FFieldName); if (Assigned(F)) and not (F.IsNull) then @@ -1354,7 +1354,7 @@ var F: TField; begin Result := True; - if ValueType in [fvtSum, fvtAvg, fvtMax, fvtMin] then + if (ValueType in [fvtSum, fvtAvg, fvtMax, fvtMin]) and (FFieldName<>'') then begin F := TRxDBGrid(FOwner.Grid).DataSource.DataSet.FieldByName(FFieldName); if Assigned(F) then @@ -1417,7 +1417,7 @@ var F: TField; begin Result := True; - if ValueType in [fvtSum, fvtAvg, fvtMax, fvtMin] then + if (ValueType in [fvtSum, fvtAvg, fvtMax, fvtMin]) and (FFieldName<>'') then begin F := TRxDBGrid(FOwner.Grid).DataSource.DataSet.FieldByName(FFieldName); if Assigned(F) then