Setting space between each printed bar code

edited May 2015 in FastReport 4.0
Hello,

For printing a code bar list I have this code:
var
  Page : TfrxReportPage;
  Band : TfrxBand;
  Bar  : TfrxBarCodeView;
  I : Integer;
 Top:integer
begin

      frxReport1.Clear;
      Page := TfrxReportPage.Create(frxReport1);
      Page.CreateUniqueName;
      Page.SetDefaults;

      Band:= TfrxReportTitle.Create(Page);
      Band.CreateUniqueName;
      Band.Top:= 0;
      Band.Height:= 20;
     
      for I := 0 to BarCodeCount do
      begin
        Bar := TfrxBarCodeView.Create(Band);
        Bar.CreateUniqueName;
        Bar.Text:= datamodule1.art_anxCODE_BARRE.asString;
        Bar.Height:= BarCodeHeight;
    //    Bar.BarType:=bcEAN13;
        
        Bar.Left:= BarCodeLeft;
        Bar.Top:=Top+10;
        Top:=Top+StrToInt(Edit1.Text);
        Bar.Align:= baNone;
     
      end;
 end;


This code works fine so, I need to make space between each printed bar code. This space is a value entered in a TEdit by the user in order to set the desired space according to the space in the paper. I tried the top property but it doens't works for me.

Can you help me please ?
And sorry for my english

Comments

  • edited 5:04AM
    Hello,

    probably a solution: insert a blank memo (with dynamical height) or other object between the barcodes?

    greetz
    Freud wrote: »
    Hello,

    For printing a code bar list I have this code:
    var
      Page : TfrxReportPage;
      Band : TfrxBand;
      Bar  : TfrxBarCodeView;
      I : Integer;
     Top:integer
    begin
    
          frxReport1.Clear;
          Page := TfrxReportPage.Create(frxReport1);
          Page.CreateUniqueName;
          Page.SetDefaults;
    
          Band:= TfrxReportTitle.Create(Page);
          Band.CreateUniqueName;
          Band.Top:= 0;
          Band.Height:= 20;
         
          for I := 0 to BarCodeCount do
          begin
            Bar := TfrxBarCodeView.Create(Band);
            Bar.CreateUniqueName;
            Bar.Text:= datamodule1.art_anxCODE_BARRE.asString;
            Bar.Height:= BarCodeHeight;
        //    Bar.BarType:=bcEAN13;
            
            Bar.Left:= BarCodeLeft;
            Bar.Top:=Top+10;
            Top:=Top+StrToInt(Edit1.Text);
            Bar.Align:= baNone;
         
          end;
     end;
    


    This code works fine so, I need to make space between each printed bar code. This space is a value entered in a TEdit by the user in order to set the desired space according to the space in the paper. I tried the top property but it doens't works for me.

    Can you help me please ?
    And sorry for my english

Leave a Comment