LazReport, avoid doing a superfluous call to GetValue if dataset is already EOF in grouped reports

git-svn-id: trunk@40795 -
This commit is contained in:
jesus 2013-04-12 07:41:17 +00:00
parent b4c8c193ae
commit ea7b51a457

View File

@ -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