mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 14:09:20 +02:00
* Fix bug #0033656: scan report for data loops and add them to ReportData
git-svn-id: trunk@38905 -
This commit is contained in:
parent
c530e031b1
commit
da133b2456
@ -1610,6 +1610,7 @@ type
|
|||||||
function CreateReportData: TFPReportDataCollection; virtual;
|
function CreateReportData: TFPReportDataCollection; virtual;
|
||||||
function CreateLayouter : TFPReportLayouter; virtual;
|
function CreateLayouter : TFPReportLayouter; virtual;
|
||||||
|
|
||||||
|
procedure CollectReportData; virtual;
|
||||||
procedure RestoreDefaultVariables; virtual;
|
procedure RestoreDefaultVariables; virtual;
|
||||||
procedure DoPrepareReport; virtual;
|
procedure DoPrepareReport; virtual;
|
||||||
procedure DoBeginReport; virtual;
|
procedure DoBeginReport; virtual;
|
||||||
@ -8757,10 +8758,39 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TFPCustomReport.CollectReportData;
|
||||||
|
|
||||||
|
Procedure CheckData(D : TFPReportData);
|
||||||
|
|
||||||
|
begin
|
||||||
|
if (D<>Nil) and (ReportData.FindReportDataItem(D)=Nil) then
|
||||||
|
ReportData.AddReportData(D);
|
||||||
|
end;
|
||||||
|
|
||||||
|
Var
|
||||||
|
I,J : integer;
|
||||||
|
P : TFPReportCustomPage;
|
||||||
|
B : TFPReportCustomBandWithData;
|
||||||
|
|
||||||
|
begin
|
||||||
|
For i:=0 to PageCount-1 do
|
||||||
|
begin
|
||||||
|
P:=Pages[i];
|
||||||
|
CheckData(P.Data);
|
||||||
|
For J:=0 to P.BandCount-1 do
|
||||||
|
if (P.Bands[J] is TFPReportCustomBandWithData) then
|
||||||
|
begin
|
||||||
|
B:=TFPReportCustomBandWithData(P.Bands[J]);
|
||||||
|
CheckData(B.Data);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TFPCustomReport.RunReport;
|
procedure TFPCustomReport.RunReport;
|
||||||
begin
|
begin
|
||||||
DoBeginReport;
|
DoBeginReport;
|
||||||
StartLayout;
|
StartLayout;
|
||||||
|
CollectReportData;
|
||||||
Validate;
|
Validate;
|
||||||
FExpr := TFPexpressionParser.Create(nil);
|
FExpr := TFPexpressionParser.Create(nil);
|
||||||
try
|
try
|
||||||
|
Loading…
Reference in New Issue
Block a user