Printing Trigger n number of times

mbskapilmbskapil Member Posts: 43
Hi All
Is there any process to repeat the printing of either header , body or any trigger n number of times during report generation.

Comments

  • DenSterDenSter Member Posts: 8,307
    Not individual sections I don't think, but check out the sales invoice document to see how you can control number of copies.
  • mbskapilmbskapil Member Posts: 43
    DenSter wrote:
    Not individual sections I don't think, but check out the sales invoice document to see how you can control number of copies.
    Well DenSter
    Even there is no such option in Sales Invoice Document,plz tell if you have any alternate
  • DenSterDenSter Member Posts: 8,307
    If I were to have to write a report that repeats itself, I would do something similar to what is done in the sales invoice report. I'm not going to write your report for you :), so you're going to have to examine that report and figure out a way to use that logic in your case.

    If you want more help you will have to be more specific.
  • David_CoxDavid_Cox Member Posts: 509
    Just repeat the sections and on the preSection add code to say if to print

    Weather, Header (1) - OnPreSection()
    CurrReport.SHOWOUTPUT := MyLoop IN[1,3,5];

    Weather, Header (2) - OnPreSection()
    CurrReport.SHOWOUTPUT := MyLoop IN[1,2,4,6];

    Weather, Header (3) - OnPreSection()
    CurrReport.SHOWOUTPUT := MyLoop IN[7,9];

    Weather, Header (4) - OnPreSection()
    CurrReport.SHOWOUTPUT(MyLoop=10);
    Analyst Developer with over 17 years Navision, Contract Status - Busy
    Mobile: +44(0)7854 842801
    Email: david.cox@adeptris.com
    Twitter: https://twitter.com/Adeptris
    Website: http://www.adeptris.com
  • DenSterDenSter Member Posts: 8,307
    I think the question was "can you repeat individual sections", and I don't think you can. I don't know a way to print one particular body section more than once for one record.
  • David_CoxDavid_Cox Member Posts: 509
    DenSter wrote:
    I think the question was "can you repeat individual sections", and I don't think you can. I don't know a way to print one particular body section more than once for one record.

    MyLoop = Integer // This is the loop or iteration counter
    >Weather = Record Weather // Indented DataItem

    If you have an Integer Loop (MyLoop) then the indented Weather Data Item it would print as many Iterations as you set with MyLoop.SETRANGE(Number,1,MaxLoops)

    I was just showing that you could then have conditional switched output based on the loop Number, if you only wanted selective sections printing

    Weather, Header (1) - OnPreSection()
    CurrReport.SHOWOUTPUT := MyLoop IN[1,3,5];
    Prints First, Third and Fifth Iterations

    You may hade a document that you print several copies with different output from one document, File Copy, Customer Copy, Packing Copy etc:

    :!:
    Analyst Developer with over 17 years Navision, Contract Status - Busy
    Mobile: +44(0)7854 842801
    Email: david.cox@adeptris.com
    Twitter: https://twitter.com/Adeptris
    Website: http://www.adeptris.com
  • DenSterDenSter Member Posts: 8,307
    Right I see, you're using an integer dataitem :) which was what I tried to point Kapil to. I thought you had a trick to print the same secion more than once.
  • David_CoxDavid_Cox Member Posts: 509
    Yep it was an extention to your answer not a replacement :lol:
    Analyst Developer with over 17 years Navision, Contract Status - Busy
    Mobile: +44(0)7854 842801
    Email: david.cox@adeptris.com
    Twitter: https://twitter.com/Adeptris
    Website: http://www.adeptris.com
Sign In or Register to comment.