How to print a report automatically

xina_manxina_man Member Posts: 116
Hi there!

Is it possible to create a routine, code, or something like that, to print automatically a report without need to push the button print.

I need to do this in the company manufacturing process because the workers are printing all the labels to a production order in advance, and we would like that navision automatically print a labe time to time.

Comments

  • garakgarak Member Posts: 3,263
    take a look at report.run();
    This system command requ. some parameters. 1. which report, 2 use systemprinter Or printer from printertable and the last ist, if you want show the request form (if the last parameter is false, the report prints on the fly)

    For an example in cronus, take a look behinde the function Post&Print on Sales Invoice.

    regards
    Do you make it right, it works too!
  • nunomaianunomaia Member Posts: 1,153
    In report you have options to define to show request form or using report.run parameters.

    You should also define in system administration witch printer should be used for that report.
    Nuno Maia

    Freelance Dynamics AX
    Blog : http://axnmaia.wordpress.com/
  • dspasovdspasov Member Posts: 33
    Hi Nunomania,
    You can call the report from Form - OnTimer() triger.Also have to set TimerInterval properties with some time.
  • WaldoWaldo Member Posts: 3,412
    dspasov wrote:
    Hi Nunomania,
    You can call the report from Form - OnTimer() triger.Also have to set TimerInterval properties with some time.

    Yes you can.

    What do you mean with "Also have to set TimerInterval properties with some time"?

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • dspasovdspasov Member Posts: 33
    I mean that to fire OnTimer() triger you have to set TimerInterval on Form properties with some time.For example TimerInterval = 10000
  • WaldoWaldo Member Posts: 3,412
    You can set it in the form properties. Don't think you can do this in code. then, you'll have to use the timer-automation which is provided by the NAV-team by default.

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
  • dspasovdspasov Member Posts: 33
    There are many solutions for the issue.I`ve just wrote simple one.In my system i have three difirent ways to print automaticaly.It depends of the customer needs.
    I belive xina-man will choose best decition depending of theres issue.

    Regards
  • WaldoWaldo Member Posts: 3,412
    I hope so :wink:

    Eric Wauters
    MVP - Microsoft Dynamics NAV
    My blog
Sign In or Register to comment.