Subject shorcut for printing
From Mustansir Ghor <mustan31@hotmail.com>
Date Thu, 09 Jun 2022 06:32:06 -0400
Newsgroups dbase.getting-started

Dear All

when I am using shorcut Alt N in a pushbutton  to print a receipt by using printer.chooserprinter() method, printer selection popups and it prints the receipt but  again second popup comes for printer selection (this does not happen when we click push button with mouse). If we say ok, it gives error message memory access violation or hangs. I am printing to Microsoftprint to PDF as testing

The constructor code for pushbutton is as follows

function PB_print()
set procedure to sales.rep
           oRep= new salesreport()
                
        
        
                with (oRep.pagetemplate1)
                 tsno.text=m1
                 tdate.text=m3
                 height=form.qtempsal.rowset.count()*0.75+3
                 streamframe1.height=form.qtempsal.rowset.count()*0.75+0.5
                endwith
                 orep.output=1
                if orep.printer.chooseprinter()
                 oRep.render()
                endif
                
                orep.close()
                oRep=null

return

If somebody experienced this error can help me

Best Regards
Mustansir