Print report from preview

ZuzanaZuzana Member Posts: 4
I have problem with printing report from preview. If I have preview of report, sometimes I can print it immediately from preview. There is print buttom in left bottom corner of preview. But sometimes there is message that this report cannot be printed form preview.
Why any report can be printed and another cannot?
Is it property of report?

Thanks a lot.

Comments

  • NRNR Member Posts: 78
    There is a function called Preview ...
    CurrReport.Preview

    Check if it is being called in the report.
  • ZuzanaZuzana Member Posts: 4
    Thanks for anmwer but I am not sure. I think that Preview function just tell me, whether report is printed in preview mode or goes straight to the printer.
    Am I wrong?
    I want make preview of the report and than push the button on the preview and print.
  • BgestelBgestel Member Posts: 136
    i dont now why the button does not want to print somethimes. Navison mistery. I know that is almost always possible to use the top left button to print, or file => print

    and the preview flag does what you think it does. tell you if the user hit the preview button.

    there is a small possibility that if nav finds the if preview condition somewhere, it doesnt allow you to print. this would make sense for example with a invoice, where not in preview mode it needs to increment the times printed value on the posted invoice header.
    **********************
    ** SI ** Bert Van Gestel **
    **********************
  • kinekine Member Posts: 12,562
    Search for the command on this forum. There are explanation of the behaviour. It is like Bgestel wrote. When some report increase the counter "Printed", this command is used to be sure that the counter is increased only if user really prints the report and not when just only preview it. And it is why you cannot print from preview if this command is used (because the code was already executed and the counter will not be increased...)
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • ZuzanaZuzana Member Posts: 4
    Thank all of you. It was really because of currReport.PREVIEW in the report. Big mystery is solved :-)
Sign In or Register to comment.