Create of Objects in Engine.PreviewPages
Hi!
I would like to print a code with TfrxLineView-Objects to my prepared Report. I use the OnProgressStop-Event.
- In the preview-window the Lines are not displayed correctly, if the report have more then 50 Pages.
- Only the first printed page have correct Lines, all other Pages are printed without the Lines
Thanks and sorry for my bad english
I would like to print a code with TfrxLineView-Objects to my prepared Report. I use the OnProgressStop-Event.
procedure TfrxKuvertierReport.PProgressStop(Sender: TfrxReport; ProgressType: TfrxProgressType; Progress: Integer);
var Page: TfrxReportPage;
  Line: TfrxLineView;
  PCount, LCount:Integer;
begin
 for PCount:=0 to Sender.Engine.TotalPages-1 do
 begin
  Page:=TfrxReportPage(Sender.Engine.PreviewPages.Page[PCount]);
  for LCount:=1 to 15 do  //15 Lines
  begin
   (LCount in [1,15]) or
   ((LCount=14) and (Page.FindBand(TfrxFooter)<>Nil)) or
   ((LCount=13) and (Page.FindBand(TfrxFooter)=Nil)) or
   ((LCount=12) and (PSequenz in [8,9,10,11,12,13,14,15])) or
   ((LCount=11) and (PSequenz in [4,5,6,7,12,13,14,15])) or
   ((LCount=10) and (PSequenz in [2,3,6,7,10,11,14,15])) or
   ((LCount=9)  and (PSequenz in [1,3,5,7,9,11,13,15])) or
   ((LCount=2) and (Page.FindBand(TfrxHeader)<>Nil)) then
   begin
    Line:=TfrxLineView.Create(Page);
    Line.CreateUniqueName;
    Line.SetBounds(0,LineStart+(LineDistance*LCount),LineLength,0);
   end;
  end;
  if Sequenz<15 then inc(PSequenz) else PSequenz:=1;
 end;
end;
2 Problems:- In the preview-window the Lines are not displayed correctly, if the report have more then 50 Pages.
- Only the first printed page have correct Lines, all other Pages are printed without the Lines
Thanks and sorry for my bad english