countnikon
9th March 2011, 01:15
Hi All.
I'm having issues with printing a report using AFS. I have created the following function that prints to our Mail Merge printer for automatic invoice archiving.
function void start.report.mail.merge.sales()
{
|*********************************************************
error.msg.1 = ("Error Setting Report")
error.msg.2 = ("Error Printing Report")
error.msg.3 = ("Error Continuing Report")
|*********************************************************
spool.device = "MM71-S"
stpapi.set.report("tdsls9404m00o","rtdsls440401000",spool.device,error.msg.1)
stpapi.put.field("tdsls9404m00o","printed", str$(tcyesno.yes))
stpapi.put.field("tdsls9404m00o","definite", str$(tcyesno.yes))
stpapi.put.field("tdsls9404m00o","ttyp.f", "tupdx100.ttyp")
stpapi.put.field("tdsls9404m00o","ttyp.t", "tupdx100.ttyp")
stpapi.put.field("tdsls9404m00o","invn.f", str$(tupdx100.ninv))
stpapi.put.field("tdsls9404m00o","invn.t", str$(tupdx100.ninv))
stpapi.put.field("tdsls9404m00o","comp.f", "100")
stpapi.put.field("tdsls9404m00o","comp.t", "100")
|stpapi.print.report("tdsls9404m00o", error.msg.2)
|message("error message 2: "&error.msg.2)
stpapi.continue.process("tdsls9404m00o", error.msg.3)
message("error message 3: "&error.msg.3)
stpapi.end.session("tdsls9404m00o")
}
I can't figure out what is going wrong. I message the error variables and nothing shows up.
Any help would be appreciated.
I'm having issues with printing a report using AFS. I have created the following function that prints to our Mail Merge printer for automatic invoice archiving.
function void start.report.mail.merge.sales()
{
|*********************************************************
error.msg.1 = ("Error Setting Report")
error.msg.2 = ("Error Printing Report")
error.msg.3 = ("Error Continuing Report")
|*********************************************************
spool.device = "MM71-S"
stpapi.set.report("tdsls9404m00o","rtdsls440401000",spool.device,error.msg.1)
stpapi.put.field("tdsls9404m00o","printed", str$(tcyesno.yes))
stpapi.put.field("tdsls9404m00o","definite", str$(tcyesno.yes))
stpapi.put.field("tdsls9404m00o","ttyp.f", "tupdx100.ttyp")
stpapi.put.field("tdsls9404m00o","ttyp.t", "tupdx100.ttyp")
stpapi.put.field("tdsls9404m00o","invn.f", str$(tupdx100.ninv))
stpapi.put.field("tdsls9404m00o","invn.t", str$(tupdx100.ninv))
stpapi.put.field("tdsls9404m00o","comp.f", "100")
stpapi.put.field("tdsls9404m00o","comp.t", "100")
|stpapi.print.report("tdsls9404m00o", error.msg.2)
|message("error message 2: "&error.msg.2)
stpapi.continue.process("tdsls9404m00o", error.msg.3)
message("error message 3: "&error.msg.3)
stpapi.end.session("tdsls9404m00o")
}
I can't figure out what is going wrong. I message the error variables and nothing shows up.
Any help would be appreciated.