magicdr
15th June 2005, 10:51
Hi

I have a problem with print reports on two file devices. The problem is that User can select device to print error report and the second device for other reports. When I run session manually everything working fine. But when I run session by job that the problem is that everythink is printed only to one device. I have attempted change spool.fileout but only one file is used to print. I don't know why. Could somebody help me?

magicdr

suribaan
15th June 2005, 16:30
I have used to different output devices like excel, text or excel and printer and emailed the output file. I have used Baan IVc4 and had worked fine.

was able to set up job mode and did worked.

Can you explain the situation more?

Thanks

magicdr
16th June 2005, 08:25
Yes, of course.

On the form is field. To this field you set the device. There is check to file device. This device is used to print error report. When click on continue then you select other two device for two reports. In script:

if not open.report(1,spool.device,1,language$,1) then
choice.again()
endif
if totals = tcyesno.yes and
not open.report(2,spool.device,1,language$,2) then
close.reports()
choice.again()
endif
if ( prnt.options = tcyesno.yes or prnt.sellpr = tcyesno.yes ) and
tipcf000.ppcf = tcyesno.yes then
if not open.report(3,spool.device,1,language$,3) then
close.reports()
choice.again()
endif
apdx = true
endif

savefileout = spool.fileout
spool.fileout = "\\dkcntbap1\opher\" & logname$ & ".txt"
if amnt_check = tcyesno.yes and
not open.report(9, error_dvc.f,0,language$,9) then
close.reports()
choice.again()
endif
spool.fileout = savefileout


And the problem is that when I set spool.fileout then this file is used for everything what go on report. When I don't send fileout then everything is go on another file which is set by job.

magicdr

suribaan
16th June 2005, 17:38
I would play with spool.fileout based on the logic when I want to print to file and when to device. Change the value in the variable based on your output requirement.

magicdr
28th June 2005, 11:12
Hi everbody,

this problem is solved. I had to set the job.device before open device and then the session start working fine.

magicdr