Progress Bar on Report Load

Alex_de_KockAlex_de_Kock Bloemfontein, Free State, South Africa
edited 6:01PM in FastReport 4.0
Could someone give me some pointers, and if it is in any way possible to build a progress bar in script, which indicates the progress while the report is being built?

Thank you

Comments

  • Alex_de_KockAlex_de_Kock Bloemfontein, Free State, South Africa
    edited 6:01PM
    Thank you Gavin. :-)
  • gpigpi
    edited 6:01PM
    You can't to use progressbar, you don't know how many pages was generated
    You can show what page number prepared at this moment only
    var FormPA: TForm;
        ButtonPA: TButton;                                                     
    procedure PageHeader1OnBeforePrint(Sender: TfrxComponent);
    begin
         FormPA.Caption := IntToStr(<Page>);                                                        
    end;
    
    procedure Page1OnAfterPrint(Sender: TfrxComponent);
    begin
         FormPA.Free;                      
    end;
    
    procedure ButtonPAOnClick(Sender: TfrxComponent);
    begin
         Engine.StopReport;
    end;
    
    begin
        FormPA := TForm.Create(nil);
        FormPA.Height := 200;
        FormPA.Width := 200;
        ButtonPA := TButton.Create(nil);
        ButtonPA.Left := 50;
        ButtonPA.Top := 50;
        ButtonPA.Width := 70;
        ButtonPA.Height := 24;
        ButtonPA.Caption := 'Cancel';
        ButtonPA.Parent := FormPA;
        ButtonPA.OnClick := @ButtonPAOnClick;                                                      
        FormPA.Show;
    end.
    

Leave a Comment