Debdas Banerjee
22nd June 2006, 13:26
Dear friends ,


I have developed a AFS for "production report operation completed " and it is working fine but it is not pop up the report( report name is rtisfc020701000). tisfc0202m000 are calling few sub session and from that sub session report is calling . i want to display the report from my AFS .


If I run the session tisfc0202m000 from RUN Program and after putting the input it gives the report automatically. But through AFS report is not coming. I am giving my code.



dt = date.num()
stpapi.put.field("tisfc0202m000","tisfc001.pdno",str$(pdno.f))
ret = stpapi.find("tisfc0202m000",err.msg)

if ret <> 1 then
message("Record not found!!")
else
ret = stpapi.mark("tisfc0202m000",err.msg)
stpapi.enum.answer("tisfc0202m000","tisfc01021",tcyesno.yes)
stpapi.enum.answer("tisfc0202m000","tisfc02023",tcyesno.yes)
stpapi.enum.answer("tisfc0202m000","tisfc02024",tcyesno.yes)
stpapi.enum.answer("tisfc0202m000","tisfc02029",tcyesno.yes)
stpapi.put.field("tisfc0202m000","qdlv.frm",str$(qty))
stpapi.put.field("tisfc0202m000","tisfc001.cwar",str$(cwar))
stpapi.put.field("tisfc0202m000","comp.frm",str$(ans.f))
stpapi.put.field("tisfc0202m000","cmdt.frm",str$(dt))
stpapi.handle.subproc("tisfc0202m000","tihra1211s000","Add")
stpapi.handle.subproc("tisfc0202m000","tisfc0202m000","Add")
stpapi.handle.subproc("tisfc0202m000","tisfc0208s000","Add")
| stpapi.set.report("tihra1211s000","rtihra121001000","D",err)
| stpapi.set.report("tisfc0202m000","rtisfc020701000","D",err)
stpapi.set.report("tisfc0208s000","rtisfc020701000","D",err)

stpapi.continue.process("tisfc0202m000",err.msg)
stpapi.end.session("tisfc0202m000",err.msg)


endif



Regards

Debdas

mark_h
22nd June 2006, 15:02
I take it you are doing backflushing? One work around that I did was to let the process session run with out a report. Then I ran another session to generate the report the user wanted to see. One other thing I did when a report was not printing correctly was to actually add some code into the session - something like this:

|*************************** PROGRAM SECTION ****************************
before.program:
spool.device = "LOURCV99"
| 20050715.st
if api.mode then
import("spool.pr.copies",spool.pr.copies)
endif

I am not sure if these will work for you.