mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 01:02:41 +02:00
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:
parent
b4c8c193ae
commit
ea7b51a457
@ -7249,13 +7249,13 @@ var
|
|||||||
b1 := Bands[btGroupHeader];
|
b1 := Bands[btGroupHeader];
|
||||||
while b1 <> nil do
|
while b1 <> nil do
|
||||||
begin
|
begin
|
||||||
curGroupValue := frParser.Calc(b1.GroupCondition);
|
if not b.dataset.eof then
|
||||||
|
curGroupValue := frParser.Calc(b1.GroupCondition);
|
||||||
{$IFDEF DebugLR}
|
{$IFDEF DebugLR}
|
||||||
DebugLn('GroupCondition=%s LastGroupValue=%s curGroupValue=%s',
|
DebugLn('GroupCondition=%s LastGroupValue=%s curGroupValue=%s',
|
||||||
[b1.GroupCondition,varstr(b1.LastGroupValue),varstr(curGroupValue)]);
|
[b1.GroupCondition,varstr(b1.LastGroupValue),varstr(curGroupValue)]);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
if (curGroupValue <> b1.LastGroupValue) or
|
if b.dataset.eof or (curGroupValue <> b1.LastGroupValue) then
|
||||||
b.Dataset.Eof then
|
|
||||||
begin
|
begin
|
||||||
// next bands should be printed on the previous record context
|
// next bands should be printed on the previous record context
|
||||||
// if we have a valid bookmark to previous record
|
// if we have a valid bookmark to previous record
|
||||||
|
Loading…
Reference in New Issue
Block a user