psuryava
13th February 2013, 11:47
Hello,

Please find below code

select tcsil999.*
from tcsil999
where tcsil999._index1 inrange {:cuno.f} and {:cuno.t}
selectdo
spool.fileout = creat.tmp.file$(bse.tmp.dir$())
stpapi.put.field( "tdind0430m000", "cuno.f", tcsil999.cuno )
stpapi.put.field( "tdind0430m000", "cuno.t", tcsil999.cuno )
stpapi.put.field( "tdind0430m000", "ddat.t", str$(date.num()))
stpapi.set.report( "tdind0430m000", "rtdind043011000", "ASCIT", error )
stpapi.continue.process( "tdind0430m000", error )
stpapi.end.session( "tdind0430m000" , error )
pending.so.file.name = spool.fileout
send.mail.to.customer()
selectempty
endselect

I want to send report output in 'spool.fileout' to customer as mail attachment.
For first record I am getting data in spool.fileout file, but for next records there is no data in spool.fileout. size of spool.fileout is always zero.

Please help.

Thanks,
psuryava

mark_h
13th February 2013, 15:03
See other thread (http://www.baanboard.com/baanboard/showthread.php?t=63706). Please only post once - moderators can move threads around if something is the wrong forum. I will lock this thread.