Fill empty columns

Hello,

I'm doing label printing. I use 4 columns and 14 rows label sheets.

There are cases where I need to start printing on a label in the middle of the label sheet and not on the first (upper left) label. How can I have the report start to print data on label #10 (leave the first 9 labels blank before starting to print from the first data record)?

Thank a lot for help

regards

Comments

  • gpigpi Volnovakha, Ukraine

    Use

    const NumberOfSkippedLines = 8;

    var i: integer;


    procedure MasterData1OnBeforePrint(Sender: TfrxComponent);

    begin

     if MasterData1.Dataset.RecordCount = 1 then

       begin

         Engine.CurX := MasterData1.ColumnWidth * (NumberOfSkippedLines mod MasterData1.Columns);

         exit;

       end;

     if (<Line> > 1) and (i < NumberOfSkippedLines mod MasterData1.Columns + 1) then

       MasterData1.Dataset.Prior;

     if (i < NumberOfSkippedLines mod MasterData1.Columns) then

       begin

         Line.Visible := False;

         //Hide all MasterData1 objects here

       end

     else

       begin

         Line.Visible := True;

         //Show all MasterData1 objects here

       end;

     inc(i);

    end;


    procedure Page1OnBeforePrint(Sender: TfrxComponent);

    begin

     i := 0;

    end;


    procedure ReportTitle1OnAfterPrint(Sender: TfrxComponent);

    begin

     Engine.CurY := Engine.CurY + MasterData1.Height * (NumberOfSkippedLines div MasterData1.Columns);

    end;


    begin


    end.

  • Hello, is working fine with Adoconection but not with TfrxIBXDataBAse.

    When the value of NumberOfSkippedLines are 4,8,12,16 every thinn is ok.

    BUt if the value of NumberOfSkippedLines 1, 3, 5 is not working .


  • In this example the value of NumberOfSkippedLines is 5

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.