Strange behaviour when previewing for the time

edited March 2018 in FastReport 4.0
Hi all,

I have a strange behaviour when I preview report for the first time but after I close the preview and reload it the behaviour disappear.
I designed my report (order form) and I use some code for drawing frame in the tab code. Maybe there something to refresh ?
Here is some screen captures. Can you help me please ?

first_screen.jpg (the behaviour when calling preview)
second_screen.jpg (the behaviour disappear when recalling preview)
bon_commande_fournisseur.fr3 (this is the designed report

Comments

  • edited March 2018
    I use an overlay band and the procedure below for drawing frame and call it in the Page1OnBeforePrint:
    procedure draw_columns;
    var
      idx:integer;
      obj:TfrxView;
    begin
      for idx:=0 to header.objects.count-1 do
      begin
        obj:=TfrxView(header.objects[idx]);
        if obj.tagstr='COLUMN' then
        begin
          with TfrxShapeView.create(body) do
          begin
            left:=obj.left;   
            top:=header.height;  
            width:=obj.width;            
            height:= engine.pageheight-header.height-footer.height-30;
          end;
        end;
                                      
      end;
    end;
    
  • edited March 2018
    I had to call the procedure draw_column in Page1OnAfterPrint.
    So, the problem is solved
    Thanks

Leave a Comment