diff --git a/packages/fcl-report/src/fpreport.pp b/packages/fcl-report/src/fpreport.pp index 0db40a424d..a09ba9815d 100644 --- a/packages/fcl-report/src/fpreport.pp +++ b/packages/fcl-report/src/fpreport.pp @@ -11127,14 +11127,15 @@ begin if Assigned(oData) and (oData<>aPageData) and (not odata.IsOpened) then oData.Open; end; - if IsFirstPass then - begin - Report.InitializeExpressionVariables; - Report.InitializePageAggregateData(lPage, aPageData); - Report.CacheMemoExpressions(lPage); - end; aPageData.First; end; + if IsFirstPass then + begin + Report.InitializeExpressionVariables; + if Assigned(aPageData) then + Report.InitializePageAggregateData(lPage, aPageData); + Report.CacheMemoExpressions(lPage); + end; InitBandList(lPage,aPageData); if Not Assigned(aPageData) then StartNewPage