Home » Developer & Programmer » Reports & Discoverer » Call report through button and updating print flag (Oracle report 6i,DB 10g)
Call report through button and updating print flag [message #417872] Tue, 11 August 2009 23:50 Go to next message
mamalik
Messages: 266
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.

Re: Call report through button and updating print flag [message #417923 is a reply to message #417872] Wed, 12 August 2009 02:11 Go to previous messageGo to next message
Littlefoot
Messages: 20888
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Let user decide whether it is printed or not and modify the flag manually.
Re: Call report through button and updating print flag [message #417957 is a reply to message #417872] Wed, 12 August 2009 05:08 Go to previous messageGo to next message
mamalik
Messages: 266
Registered: November 2008
Location: Pakistan
Senior Member

Sir, Its security problem. we can not allow user to set flag.
Re: Call report through button and updating print flag [message #417968 is a reply to message #417872] Wed, 12 August 2009 05:31 Go to previous message
shaz
Messages: 182
Registered: June 2009
Senior Member
when the statement gets executed, the system will assume that the information sent to the printer will be printed successfully.
You have to intimate your users that print will be send once and they have to keep their printer in a ready state.
Previous Topic: Problem with boilerplated items taking up space on the next page with fields expand vertically
Next Topic: different format mask
Goto Forum:
  


Current Time: Fri Dec 02 23:19:01 CST 2016

Total time taken to generate the page: 0.09339 seconds