brugmanrad
7th June 2002, 16:46
Hello,
I want to print the sales invoices to two printers, the original has to be printed to a different printer than the duplicate. This has to be executed automatically, not through reprint, or bwprint-preview.
I do not have the source, so I can not change anything in the program script. I need to do it in the report script.
Is there a possibility to do so?
JamesV
7th June 2002, 18:46
This can be a bit of a kludge but you can also setup a UNIX print queue that prints to multiple printers automatically.
-- Jim
mark_h
7th June 2002, 19:32
You could create a function server to call this report. Since I am not familiar with this session this may not be an option. Anyway, all you need to do is have a form with the same fields and pass them to the session. If you always print to the same printers then you do not even need to prompt them for the devices. I like this better than trying to figure out how to do this in the report script.
Good Luck!
Mark
~Vamsi
7th June 2002, 19:39
Jim/Mark,
We need more information. If the original and the duplicate are both printed as a "single report" (which is the case in most reports of this kind), it becomes very difficult to pipe part of the report to one printer and another part to a different printer. My 2 bits.
victor_cleto
7th June 2002, 23:10
If the original + duplicate is the same report, and you are on UNIX, just create a script that calls lp twice (using same parameters), one for each printer.
Then create a printer device in Baan that calls this script.
Han Brinkman
8th June 2002, 21:50
The problem is that within the invoice print the original and the copies are printed as one file.
I have changed reports in such a way that the original is printed from another bin than the copy but I haven't done this untill now.
However with some advanced shell programming in the printer interface script it should be possible.
I think that doing it from out the report is not so easy.
Han
mark_h
9th June 2002, 03:49
I think I understand now. I believe Han is correct and it could be done in the interface script. Or if scripting is not your thing, then you could probably write your own device driver in Baan. Probably not easy no matter what you select.
Good Luck!
Mark
brugmanrad
10th June 2002, 11:28
I am working on Windows NT, so I can not do anything with drivers
Darren Phillips
10th June 2002, 14:08
there is a way to do it automatically under NT if it is run as a job.
1. install port redirection software http://www.cs.wisc.edu/~ghost/redmon/
2. create a printer in NT using the redirection port and setup a device in baan to use this printer.
3. create a job of the print sales invoice session using the printer that you just created.
4. you can setup the printer to redirect the output to a file, using a program called redfile which comes with the redmon software.
5. add a shell command to the end of the baan job which calls a batch file to print the file created by redmon.
example
print /d:\\printservername\printer1 c:\report.txt
print /d:\\printservername\printer2 c:\report.txt
~Vamsi
10th June 2002, 18:02
Darren,
The problem is not sending the sending the same report to two different printers. It is sending part of the report to one printer and another part to a different printer. So we need more code which can accomplish this.