sakthi kj
21st June 2018, 09:51
I am fresher....

How to the report will be saved in the file
pls...give me the example script

mark_h
21st June 2018, 14:34
Well it might depend on what you are really trying to do. In the below case spool.device could be a printer or a file (depending on the users settings). So it opens the report and brp.open - not prompting for a device, then uses brp.ready to send information to the report, then closes with brp.close. I did not include all the code. Here is another thread like this http://www.baanboard.com/baanboard/showthread.php?t=70882&highlight=spool.open


rprt.id1 = brp.open("rtdapi042011000", spool.device, 1)
if rprt.id1<=0 then
brp.close(rprt.id1)
rc = appl.delete(lockset)
return
endif

select tdapi401.*
from tdapi401
where tdapi401._index1 = {:hold.runn}
and tdapi401.orno = :hold.orno
and tdapi401.opno = :hold.opno | 20080811 Add opno to the select
and tdapi401.cwar = :hold.cwar
selectdo
| Delete outbound for 0 qty
if tdapi401.qsts = 0 then
delete_outbound(tdapi401.runn,
tdapi401.orno,
tdapi401.pono,
tdapi401.pono,
errmsg)
if not isspace(errmsg) then
releasedqty = 0
rptmsg = "Unable to delete 0 qty outbound."
brp.ready( rprt.id1 )
endif

.... do other stuff.....

brp.close(rprt.id1)

sakthi kj
22nd June 2018, 07:22
what is the purpose of appl.delete

bdittmar
22nd June 2018, 10:12
what is the purpose of appl.delete

Have a look at.
http://www.baanboard.com/programmers_manual_baanerp_help_functions_appl_appl_delete

Regards

mark_h
22nd June 2018, 14:15
I use application locks in the session that the code snippet is from. That is from one of my function servers for outbound(not sure which one) but it keeps 2 users from trying to do the same order.