VishalMistry
10th November 2015, 07:35
Hi all,
I have a session where I ask user to put maximum of five purchase order number and then print them one by one. for then in declaration section I have defined an array of 5 element as below:
extern domain tcorno orno(5)
and through loop, I am trying to print all the purchase order one by one:
for element = 1 to 5
stpapi.put.field("tdpur4401m000","orno.f",spool.fileout)
stpapi.put.field("tdpur4401m000","orno.t",orno(element))
stpapi.put.field("tdpur4401m000","printed",str$(printed))
stpapi.set.report("tdpur4401m000", "rtdtri440106000", "NOTEPAD", error.msg)
export("spool.fileout",spool.fileout)
stpapi.print.report("tdpur4401m000", error.msg)
stpapi.end.session( "tdpur4401m000", error.msg)
endfor
But I am getting an error mesasge as indicated in screen shot. I am unable to identify what is wrong with the code. Can anybody help me sort this out ?
Vishal
I have a session where I ask user to put maximum of five purchase order number and then print them one by one. for then in declaration section I have defined an array of 5 element as below:
extern domain tcorno orno(5)
and through loop, I am trying to print all the purchase order one by one:
for element = 1 to 5
stpapi.put.field("tdpur4401m000","orno.f",spool.fileout)
stpapi.put.field("tdpur4401m000","orno.t",orno(element))
stpapi.put.field("tdpur4401m000","printed",str$(printed))
stpapi.set.report("tdpur4401m000", "rtdtri440106000", "NOTEPAD", error.msg)
export("spool.fileout",spool.fileout)
stpapi.print.report("tdpur4401m000", error.msg)
stpapi.end.session( "tdpur4401m000", error.msg)
endfor
But I am getting an error mesasge as indicated in screen shot. I am unable to identify what is wrong with the code. Can anybody help me sort this out ?
Vishal