Browse Source

* Always initialize memo expressions, even if no Data available

git-svn-id: trunk@38561 -
michael 7 years ago
parent
commit
10121a4777
1 changed files with 7 additions and 6 deletions
  1. 7 6
      packages/fcl-report/src/fpreport.pp

+ 7 - 6
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