Options

Printing fixed nos. of lines

pallab514pallab514 Member Posts: 3
Hi,

I would like to print fixed nos. of lines in the Body section of a report. For e.g. I would like to print 10 lines out which 4 may contain data and the balnce 6 lines will be blank. Can any body help me?

Thanks

Comments

  • Options
    kinekine Member Posts: 12,562
    Count the printed lines and rest print through Integer DataItem after that...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    eromeineromein Member Posts: 589
    Or you could make a 4 line empty section do somthing like the following in the OnPreSection() trigger:
    CurrReport.SHOWOUTPUT(counter MOD 4 = 0);
    

    * Code has not been tested.
    "Real programmers don't comment their code.
    If it was hard to write, it should be hard to understand."
  • Options
    kinekine Member Posts: 12,562
    eromein wrote:
    Or you could make a 4 line empty section do somthing like the following in the OnPreSection() trigger:
    CurrReport.SHOWOUTPUT(counter MOD 4 = 0);
    

    * Code has not been tested.

    But this is not the general solution... try to not use some preconditions that there will be 4 lines.... :-) in two days you will be changing it to 5, 6, 7, 20... ;-)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    eromeineromein Member Posts: 589
    It's a sample. You should change the 4 to a global variable which is set in the OnPreReport trigger.

    Thing is, even if you should use an integer loop, there is always a place in Navision where you will need to set the (a) number of lines.
    "Real programmers don't comment their code.
    If it was hard to write, it should be hard to understand."
  • Options
    kinekine Member Posts: 12,562
    Problem is not in the "magic" constant but in the fixed section for "4 lines"... It is needed to create one line section and this print in loop...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.