Print PO Once

Hi All, Greetings, How do I limit user to print purchase order report only once? Next time, the report should be displayed on screen option only, but on print option, the print shouldn’t fire. How to get around this? Any help appreciated. Thanks and Best Regards, Dilip

Hi, Good to see you after a long time. Hope you are having a good time with Axapta [}:)] Coming to this requirement - AFAIK, there is no standard Axapta functionality for this. You might have to do some development - something like creating a flag when an user prints a particular PO and checking the flag for subsequent print commands. Just curious - is there any particular reason you are looking for this functionality? Regards, Harish Mohanbabu

Hi Harish, Hope you are doing good and Thanks for the prompt reply. I was working on some other project outside Axapta for quite some time now. Coming back, This is because the company’s rules that it wants to restrict PO print to one time for some security aspects. I have done some things like adding a new field in Purchtable and setting the status 1 in print method in the report etc. but somehow it doesn’t work as I have to handle multiple things like the report should be shown on screen but not be printed and also, I tried to overwrite print and added some custom methods in SysPrintForm but no luck yet becoz SysPrint form is used by all reports. Also, one more thing I wanted to ask there’s a FormNotes form in Accounts Payable->Setup Menu wherein there’s a button for PrintManagement. I went to this form and there’s an option called PurchaseOrder against which we can set parameters for Original and No.oF Copies, Initially no.of copies was 0, I set it to 1 but no effect. Anyone aware the functionality of this option? Thanks and Regards, Dilip

I have achieved some success that is im able to restrict user to print one time when he selects the printer option. Now i’m facing problem with the Screen option. As all of you know, report operates in 2 modes: Screen and Printer(direct print)…I’m stuck with these questions… 1. When I click the printer icon in Screen, why doesn’t it call the report’s print method? It invokes the SysPrintForm’s okpressed button. 2. I’m aware of reports init,fetch,send,print methods but anyone know how to trap report’s close event? 3. Somewhere I have seen PO Original and PO Copy option in some classes code, anyone aware of this what it means actually? Thanks and Regards, Dilip

Just an update - After some struggle, I got to the crux of my problem, I found that modifying the createreportviewer of ClassFactory, coupled with some modifications in sysprintform helped me to achieve my goal of restricting the user to print from screen. regards, dilip