LazReport, fix invalid typecast on using subreport and pen object, issue #26504

git-svn-id: trunk@46138 -
This commit is contained in:
jesus 2014-09-06 06:06:40 +00:00
parent 8a7aef4759
commit a85a527721

View File

@ -6152,15 +6152,18 @@ begin
for i := SubIndex to Objects.Count - 1 do for i := SubIndex to Objects.Count - 1 do
begin begin
t :=TfrView(Objects[i]); t :=TfrView(Objects[i]);
Page := CurReport.Pages[(t as TfrSubReportView).SubPage]; if t is TfrSubReportView then
Page.Mode := pmBuildList; begin
Page.FormPage; Page := CurReport.Pages[(t as TfrSubReportView).SubPage];
Page.CurY := y + t.y; Page.Mode := pmBuildList;
Page.CurBottomY := Parent.CurBottomY; Page.FormPage;
Page.XAdjust := Parent.XAdjust + t.x; Page.CurY := y + t.y;
Page.ColCount := 1; Page.CurBottomY := Parent.CurBottomY;
Page.PlayFrom := 0; Page.XAdjust := Parent.XAdjust + t.x;
EOFArr[i - SubIndex] := False; Page.ColCount := 1;
Page.PlayFrom := 0;
EOFArr[i - SubIndex] := False;
end;
end; end;
Parent.LastBand := nil; Parent.LastBand := nil;
end; end;
@ -6176,17 +6179,20 @@ begin
for i := SubIndex to Objects.Count - 1 do for i := SubIndex to Objects.Count - 1 do
begin begin
t :=TfrView(Objects[i]); t :=TfrView(Objects[i]);
Page := CurReport.Pages[(t as TfrSubReportView).SubPage]; if t is TfrSubReportView then
Page.CurY := Parent.CurY; begin
Page.CurBottomY := Parent.CurBottomY; Page := CurReport.Pages[(t as TfrSubReportView).SubPage];
Page.CurY := Parent.CurY;
Page.CurBottomY := Parent.CurBottomY;
end;
end; end;
EOFReached := True; EOFReached := True;
MaxY := Parent.CurY; MaxY := Parent.CurY;
for i := SubIndex to Objects.Count - 1 do for i := SubIndex to Objects.Count - 1 do
begin begin
if not EOFArr[i - SubIndex] then t :=TfrView(Objects[i]);
if (t is TfrSubReportView) and (not EOFArr[i - SubIndex]) then
begin begin
t :=TfrView(Objects[i]);
Page := CurReport.Pages[(t as TfrSubReportView).SubPage]; Page := CurReport.Pages[(t as TfrSubReportView).SubPage];
if Page.PlayRecList then if Page.PlayRecList then
EOFReached := False EOFReached := False
@ -6214,9 +6220,13 @@ begin
for i := SubIndex to Objects.Count - 1 do for i := SubIndex to Objects.Count - 1 do
begin begin
t :=TfrView(Objects[i]); t :=TfrView(Objects[i]);
Page := CurReport.Pages[(t as TfrSubReportView).SubPage]; if t is TfrSubReportView then
Page.ClearRecList; begin
Page := CurReport.Pages[(t as TfrSubReportView).SubPage];
Page.ClearRecList;
end;
end; end;
Parent.CurY := MaxY; Parent.CurY := MaxY;
Parent.LastBand := nil; Parent.LastBand := nil;
end; end;