Jaroslaw
25th August 2004, 19:48
Hi all,
This is my first attempt at using AFS.
Here is the code
stpapi.put.field("tdilc4905ma00", "clot.f", coil.f)
stpapi.put.field("tdilc4905ma00", "clot.t", coil.f)
stpapi.set.report("tdilc4905ma00", "rtdilc490511a00", "D", error.msg)
stpapi.continue.process("tdilc4905ma00", error.msg)
if not isspace(error.msg) then
message(error.msg)
endif
stpapi.end.session("tdilc4905ma00")
As you can see, I am just trying to print a report, thats all. Here is my problem:
Whatever I put into the "device" parameter of the stpapi.set.report function, I always get the "Device not found" message. I have even tried selecting from table ttaad300 "Device Data" and passing field ttaad300.devc, but to no avail. Also, I tried using stpapi.print.report instead of stpapi.continue.process but the result was the same.
Here is the code from session tdilc4905ma00:
choice.cont.process:
on.choice:
execute(print.data)
choice.print.data:
on.choice:
if open.report(1, "", 1) then
read.main.table()
close.reports()
else
choice.again()
endif
Does anyone know what I could be missing?
Any comments are welcome :) .
Jaroslaw
This is my first attempt at using AFS.
Here is the code
stpapi.put.field("tdilc4905ma00", "clot.f", coil.f)
stpapi.put.field("tdilc4905ma00", "clot.t", coil.f)
stpapi.set.report("tdilc4905ma00", "rtdilc490511a00", "D", error.msg)
stpapi.continue.process("tdilc4905ma00", error.msg)
if not isspace(error.msg) then
message(error.msg)
endif
stpapi.end.session("tdilc4905ma00")
As you can see, I am just trying to print a report, thats all. Here is my problem:
Whatever I put into the "device" parameter of the stpapi.set.report function, I always get the "Device not found" message. I have even tried selecting from table ttaad300 "Device Data" and passing field ttaad300.devc, but to no avail. Also, I tried using stpapi.print.report instead of stpapi.continue.process but the result was the same.
Here is the code from session tdilc4905ma00:
choice.cont.process:
on.choice:
execute(print.data)
choice.print.data:
on.choice:
if open.report(1, "", 1) then
read.main.table()
close.reports()
else
choice.again()
endif
Does anyone know what I could be missing?
Any comments are welcome :) .
Jaroslaw