macahu
4th July 2002, 11:05
Hi everybody,
I want to send a same report to several printers. At the moment,
I'm using the maintain device queue (ttaad3120m000) to reprint a report on each printer. Is it possible to do this in one step (make some thing in the script) or to use ttaad3120m000 in a job.
thank you for your help
Macahu
mark_h
5th July 2002, 00:29
First I would search this forum for something like printer. Options for this have been mentioned several times.
One way is to just write your own session to run the report (API function server), send the report to disc and then print a distribution.
The way I handled something like this was to send the report to a ASCII. Then I created a session the userd could to print the report and then the did not need access to "maintain device queue".
Good Luck!
Mark
OmeLuuk
5th July 2002, 09:39
There are different document handling systems that can be used as add-in for Baan, streamserve is one of them. They can do this and many more (like email / fax / combine multiple prints for the same customer during a day and print them in one go, so it is easier to mail them in one envelope etc).
spartacus
5th July 2002, 09:44
If you are able to do some programming, you can gather some information about functions like "brp.open" and "spool.device". This are functions which do something like a low level "rpt.open()". With that functionality you should be able to chose devices for printing in the program script.
Hope that helps
Spartacus
NPRao
5th July 2002, 10:04
Hi Macahu,
This might seen to be quite a rational and off-beat idea.
Maybe you can write you 3,4-GL interface program for the device data session, that you can make a dropdown box, or a zoom kinda session where you can choose multiple printers and then click the OK or Print kind of a button (setting an option or form command) and you can get multiple printouts on different printers.
It might look similar to the ttstperrlog sessions, only that you can choose one or more items.
Syntax
long create.object( long type, long parent_object [, long attribute, value [, size] ] ... )
Description
This creates a new object of the specified type.
Object Accepts children Subobject Accepts children
DsCdDListBox no
DsClistBox no
© 1998 Baan Development B.V. All rights reserved
macahu
5th July 2002, 13:25
Thanks a lot guys to your suggestions and recommendations, I have several ways of solving the problem now.
Macahu
NPRao
5th July 2002, 19:31
Hi Macahu,
I have seen your postings at the other site -
kamel dendene via baan-erp-l [baan-erp-l@openitx.com]
at the site -
www.baanassist.com (http://www.baanassist.com)
also, with the same topic and please do post your solution to share knowledge with others.
Thanks!
macahu
10th July 2002, 11:27
Hi Rao,
Sorry for this delay, I was on leave. You are right RAO, least things is to share the solutions what reinforces the group as regards knowledge. On the other site (baanassist.com), people propose to use a standard functions and how to write to an XML file (I think that was treated in this forum) here the solution of someone :
We can use the BRP set of 4GL commands to alter the print functionality. When sending to multiple print devices (especially
if it's the same print device every time), you could add multiple
brp.ready() statements and indicate the different brp_id's established in the brp.open() commands.
As for writing to an XML file, you could do the same steps except write to a device designed to be "rewrite file" and make sure your report was formatted to be proper XML.
Another way to handle the XML scenario would be to use the string output commands (seq.open(), seq.puts(), and seq.close()). As long as you formatted your seq.puts() command to use correct XML, you could have the report data (or any other data if you didn't want to use a formal report) written to the file of your choice.
and another one propose :
We can define as a printer (as a device)
>device XML
>description : XML print
>device type rewrite file
>4gl program ttstpconv
>argument XML
I hope that interests some.
In what relates to me, while taking the advice of mark, I sought all the old solutions in Baanboard using quick search in forum and I fell on the solition in Darren which proposes the use of redmon. It is the solution which I currently explore :
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
Macahu