kiranu
23rd August 2005, 09:52
Hi,

i have a problem with afs when i want to set a report.

i am working on a session and i want to invoke session tipcf5280m000.
In this session, my script put values to the fields and then continue.

After that, in tipcf5280m000 session three question screen pop up. To answer them, i used stpapi.enum.answer() function. And then i used set.report() function and then i used continue.process() function.

But when continue.process command run, it gives a error and says "Printing canceled". I could not understand why. The spool screen should close.but not sure.

This is code:

stpapi.handle.subproc("tdsls1441m00u","tipcf5280m000","add")
stpapi.zoom.option("tdsls1441m00u",1,"tipcf5280m000",err1)

stpapi.put.field("tipcf5280m000","proj.code",str$(tdsls041.orno))
stpapi.put.field("tipcf5280m000","pvar.code","21")
stpapi.put.field("tipcf5280m000","item.code",str$(tdsls041.item))

stpapi.enum.answer("tipcf5280m000","tipcf52805",tcyesno.no)
stpapi.enum.answer("tipcf5280m000","tipcf51208",tcyesno.no)
stpapi.enum.answer("tipcf5280m000","tipcf52806",tcyesno.yes)

stpapi.set.report("tipcf5280m000","rtipcf528001000","D",err1)
stpapi.continue.process("tipcf5280m000",err1)


Thanks for your help.

en@frrom
23rd August 2005, 10:53
Maybe the continue process is not linked to the print option? Maybe behind the print button there is a different function? print.data or else...? Look at the form...

kiranu
23rd August 2005, 11:09
Hi,

firstly thanks for your reply.

ok. I checked it and there is no print.data() function.

But when i start session tipcs5280m000 manually and run it, it is working. But I can not continue with afs in my tdsls1441m00u session's script.

How can i solve this problem?

Unsal

en@frrom
23rd August 2005, 11:15
Do you have source of tipcf5280m000? Like that you can debug and see where it goes wrong. According to the message 'printing cancelled', my guess is that you answer one of the questions worngly... maybe you double check that?

kiranu
23rd August 2005, 11:49
Hi again,

it should be true. Because it is same when i run it manually.
if you have chance to run this session, you can test it. When you start session tipcf5280m000, it will ask three question. And the answer will be like, " No, No, Yes". And then it will give a message. Not question. When you push button "Ok", the reporty will come and it will work correctly. BUt in my script after i set.report() and continue.process(), it gives this error.

Should it be because of this "Ok" button? I dont know how can i say "ok" trough afs script.

Thanks.

mark_h
23rd August 2005, 23:20
Like en@frrom asked - do you have source? Or even one of the extend source solutions? It will make debugging the problem easier. Also if it returns a message - not an error, but just a message then you should not have to worry about it. You might want to try get the last message from the session and make sure it is the same as what you get manually.

What I suggest(even if you have source) is contacting Baan. Make sure you have the latest stpapi and session objects. It maybe that someone else has logged the problem and Baan can provide a solution.

Do you have to start tipcf5280m000 with the zoom option? Since I only see these two commands for tdsls1441m00u:

stpapi.handle.subproc("tdsls1441m00u","tipcf5280m000","add")
stpapi.zoom.option("tdsls1441m00u",1,"tipcf5280m000",err1)

is there more commands that you do manually before launching the tipcf session? I am not familiar with these two sessions I am not positive what takes place before the actual zoom. It maybe that something is not making it from tdsls1441 to tipcf5280. Just some thoughts.

kiranu
24th August 2005, 11:29
Hi guys,

Thanks first of all for your replies.

Firstly, I have a source but it is to strange that i can not compile it. I changed my current vrc but when i want to compile it, it gives such a error
"To compile, the package combination must be filled at package vrc ti b40 c1".
I could not understand this error.

Secondly, as you said, Mark, i dont need "stpapi.handle.subproc() and zoom.option".

But still i have a problem. It still ives "Printing canceled" and i could not compile tipcf5280m000 script.

Unsal

en@frrom
24th August 2005, 13:12
You can only compile a source which is in your development lever VRC. If this is not the case (i.e. the source is in standard layer), then you first have to copy it to your current VRC, and then you can compile.

kiranu
24th August 2005, 15:25
okeeeyyy,

it is working now.

You were rigth. There is no print.data() function. I added it and made some changes. now it is working.

Thanks for your help.

See you next time :))

Unsal