Call report through button and updating print flag [message #417872] |
Tue, 11 August 2009 23:50 |
mamalik
Messages: 270 Registered: November 2008 Location: Pakistan
|
Senior Member |
|
|
Dear All,
I have a button on report. when user click on the button follwoing command executes and recall the report and send to printer for printing.
srw.run_report('report=x:\02\02\Vor_Prn.rep from_ref_no='||:from_ref_no || ' to_ref_no='||:to_ref_no || ' P_Vr_type='||:P_Vr_Type|| ' P_Pre_By='||NVL(:P_Pre_By,0) || ' year1='||:year1|| ' MNU_IDE='||:Mnu_Ide || ' desTYPE=PRINTER batch=yes PRINTJOB=NO COPIES=1' );
after sending report to printer follwoing statment updates the flag in table that report is printed.
statement is
update account.trans set approved = null where vr_type = :P_Vr_type and (Ref_no Between :from_ref_no And :to_ref_no)
problem is that sometimes printer is off or printer is out of order, report is not printing but flag is changed to printed.
how can i override that above update statement should run if report is printed successfully by printer.
Regards.
Asif.
|
|
|
|
|
|