From ea7b51a457d7a005ae4ea714dbaf2b25ddb86ca6 Mon Sep 17 00:00:00 2001 From: jesus Date: Fri, 12 Apr 2013 07:41:17 +0000 Subject: [PATCH] LazReport, avoid doing a superfluous call to GetValue if dataset is already EOF in grouped reports git-svn-id: trunk@40795 - --- components/lazreport/source/lr_class.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/lazreport/source/lr_class.pas b/components/lazreport/source/lr_class.pas index 3520b71f03..dec3101615 100644 --- a/components/lazreport/source/lr_class.pas +++ b/components/lazreport/source/lr_class.pas @@ -7249,13 +7249,13 @@ var b1 := Bands[btGroupHeader]; while b1 <> nil do begin - curGroupValue := frParser.Calc(b1.GroupCondition); + if not b.dataset.eof then + curGroupValue := frParser.Calc(b1.GroupCondition); {$IFDEF DebugLR} DebugLn('GroupCondition=%s LastGroupValue=%s curGroupValue=%s', [b1.GroupCondition,varstr(b1.LastGroupValue),varstr(curGroupValue)]); {$ENDIF} - if (curGroupValue <> b1.LastGroupValue) or - b.Dataset.Eof then + if b.dataset.eof or (curGroupValue <> b1.LastGroupValue) then begin // next bands should be printed on the previous record context // if we have a valid bookmark to previous record