From 514a2ed285dc6700e30c543c0e6d7fbc355a9114 Mon Sep 17 00:00:00 2001 From: jesus Date: Fri, 10 Sep 2010 20:45:11 +0000 Subject: [PATCH] LazReport, fix initial value on COUNT aggregate function, band name was not evaluated correctly git-svn-id: trunk@27295 - --- components/lazreport/source/lr_class.pas | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/components/lazreport/source/lr_class.pas b/components/lazreport/source/lr_class.pas index 39b6996bad..0092285867 100644 --- a/components/lazreport/source/lr_class.pas +++ b/components/lazreport/source/lr_class.pas @@ -9463,8 +9463,12 @@ begin else if (DataSet = nil) or (Field = nil) then begin s1 := Trim(string(p2)); - if s1 = '' then - s1 := CurBand.View.Name; + if s1 = '' then begin + if (dk=dkCount) and (p1+''<>'') then + s1 := p1 + else + s1 := CurBand.View.Name; + end; if dk <> dkCount then s2 := Trim(string(p3)) else s2 := Trim(string(p2));