How to Count Num of Prints as Default Crounus Does

tejateja Member Posts: 78
Hi All,

I run Posted Invoice form From sales & Marrketing -> History . In that , I Run Print Invoice Reprot. What I noticed is , if I derctly click the Print Button it is counting the Printed DOC's in sales Inv Header. But, Firstly when i run preview and from there if I print that report it is showing a msg as
This report cannot be printed from Print Preview. Quit Print Preview and run the report.

But , The same I done for the customized reports by me , the message is not coming. I tried with debugger , but I can't find where that msg is coming from.

Please help me in resolving this Issue..

Regards,
Teja

Answers

  • AlbertvhAlbertvh Member Posts: 516
    Hi Teja,

    If you look in the Invoice print you will see this code
    IF NOT CurrReport.PREVIEW THEN
      SalesInvCountPrinted.RUN("Sales Invoice Header");
    

    This code is in the CopyLoop OnPostDataItem, this prevents the user from printing when previewing the report.
    Hope this clears it up for you.


    Albert
  • BeliasBelias Member Posts: 2,998
    search online help or mibuso for
    Currreport.PREVIEW
    
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • tejateja Member Posts: 78
    Hi Albertvh & Belias,

    Thanks for the Solution.









    Regards,
    Teja.......
Sign In or Register to comment.