Options

Fix line in body section just seven lines

klumklum Member Posts: 102
Hi all,

I need to fix line only seven lines in body section when they have eighth line they should to show on NEWPAGE. I use Sale Invoice Line on body section.

Please help me ](*,)

Thanks

klum

Comments

  • Options
    krikikriki Member, Moderator Posts: 9,089
    I am not sure I understood what you mean. But if you mean that the maximum lines you want per page is 7, then try something like this:

    Sales Invoice Line - OnPreDataItem():
    intMyCounter := 0;



    Sales Invoice Line - OnAfterGetRecord():
    intMyCounter += 1;
    IF intMyCounter = 8 THEN BEGIN
    intMyCounter := 0;
    CurrReport.NEWPAGE;
    END;
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Options
    klumklum Member Posts: 102
    Hi kriki,

    I try what did you suggest me but on new page or second page is not show. On first page now have 7 per page that's correct.


    Anybody know why not show on new page after 7 lines ???


    Thank in advance

    klum
  • Options
    klumklum Member Posts: 102
    Hi Savatage,

    I tried what you suggestion like this

    Report - OnInitReport()
    MaxLines := 7;

    Sales Invoice Line - OnPreDataItem()
    LineCounter := 0;

    Sales Invoice Line - OnAfterGetRecord()
    LineCounter += 1;
    IF LineCounter > MaxLines THEN BEGIN
    CurrReport.NEWPAGE;
    LineCounter := 0;
    END;

    Page 1 it's work well but Page 2 not work not show anything and i can not print report ](*,) ](*,) ](*,)

    Thanks

    klum
  • Options
    klumklum Member Posts: 102
    Hi all,

    Now my report work as well

    I just put some thing wrong place.

    First I put about CLEAR(...) wrong at Sales Invoice Header, Header(1) - OnPreSection.

    Correct is I move CLEAR(...) at Sales Invoice Header - OnAfterGetRecord.

    klum :D \:D/
Sign In or Register to comment.