monica1
17th November 2005, 12:57
I need to do this: I am in company 700 executing a program and in this program I need to print a report but in another company. It is possible?

I have this code but it doesn´t work. Where is the problem?



#pragma used dll ottstpapihand

company = get.compnr() | 700

stpapi.put.field("ttdsk2003m000", "comp", "402")
stpapi.form.command("ttdsk2003m000", 5, "continue", error.msg)
stpapi.end.session("ttdsk2003m000")

print.report()




Thank you in advance,

Juergen
17th November 2005, 14:20
Hi monica,

why not use the switch.to.company function?


switch.to.company(402)

monica1
17th November 2005, 14:31
Thank you very much. It works perfectly.