Browse Source

* Allow unpreparing of report

git-svn-id: trunk@38375 -
michael 7 years ago
parent
commit
80d95cd787
1 changed files with 17 additions and 3 deletions
  1. 17 3
      packages/fcl-report/src/fpreport.pp

+ 17 - 3
packages/fcl-report/src/fpreport.pp

@@ -1538,9 +1538,11 @@ type
     procedure   RemovePage(APage: TFPReportCustomPage);
     procedure   RemovePage(APage: TFPReportCustomPage);
     function    FindRecursive(const AName: string): TFPReportElement;
     function    FindRecursive(const AName: string): TFPReportElement;
     procedure   RunReport;
     procedure   RunReport;
+    Procedure   ClearPreparedReport; virtual;
+    Function    Prepared : Boolean;
     Procedure StartDesigning; virtual;
     Procedure StartDesigning; virtual;
     Procedure EndDesigning; virtual;
     Procedure EndDesigning; virtual;
-    procedure   RenderReport(const AExporter: TFPReportExporter);
+    procedure RenderReport(const AExporter: TFPReportExporter);
     Property Variables : TFPReportVariables Read FVariables Write SetVariables;
     Property Variables : TFPReportVariables Read FVariables Write SetVariables;
     {$IFDEF gdebug}
     {$IFDEF gdebug}
     function DebugPreparedPageAsJSON(const APageNo: Byte): string;
     function DebugPreparedPageAsJSON(const APageNo: Byte): string;
@@ -7716,6 +7718,16 @@ begin
   DoEndReport;
   DoEndReport;
 end;
 end;
 
 
+procedure TFPCustomReport.ClearPreparedReport;
+begin
+  EmptyRTObjects;
+end;
+
+function TFPCustomReport.Prepared: Boolean;
+begin
+  Result:=RTObjects.Count>0;
+end;
+
 procedure TFPCustomReport.RenderReport(const AExporter: TFPReportExporter);
 procedure TFPCustomReport.RenderReport(const AExporter: TFPReportExporter);
 begin
 begin
   if not Assigned(AExporter) then
   if not Assigned(AExporter) then
@@ -9968,9 +9980,11 @@ end;
 procedure TFPReportLayouter.EndPage;
 procedure TFPReportLayouter.EndPage;
 begin
 begin
   if Assigned(FRTPage) then
   if Assigned(FRTPage) then
+    begin
     EndColumn;
     EndColumn;
-  { bottom stacked group and column footers }
-  HandleBottomStackedFooters;
+    { bottom stacked group and column footers }
+    HandleBottomStackedFooters;
+    end;
 end;
 end;
 
 
 procedure TFPReportLayouter.StartNewColumn;
 procedure TFPReportLayouter.StartNewColumn;