tadina
6th March 2008, 12:09
I need help.
I would like to send report to two diferent devices.
1'st device is on printer
2'nd device is on file
Do you have any sugestion???
Thanks.
tadina
6th March 2008, 13:01
if I use spool.open() the device open's but I dont know how to sent the data to the report ???
Thanks
tadina
6th March 2008, 13:02
I would like to manipulate with device's in the device script
Kozure Ohashi
6th March 2008, 13:41
extern domain tcmcs.str15 spool.file fixed
extern domain tcmcs.str15 spool.printer fixed
spool.file = "ASCIF"
spool.printer = "PR100"
brp_id1 = brp.open.language( "rtccom0401010003", spool.device, 1 )
brp_id2 = brp.open.language( "rtccom0401010003", spool.device, 1 )
Regards,
Kozure
tadina
6th March 2008, 14:35
But I'm not programing in report script but in device script ???
After the 1'st device creates the file I need the 2'nd device to start to print report on printer.
After device script creates file = OK I would like to open the spool = OK, but no data is printed ???
tadina
6th March 2008, 14:36
I would like to know what is a push comand to send report to spool.device
Kozure Ohashi
6th March 2008, 14:53
Not sure what you are doing, but ...
brp.ready -> sends the data to the opened spool.device.
But this is programmed in the report script.
Can you please explain what you mean with device script.
Regards,
Kozure
tadina
6th March 2008, 15:01
Device script is 4gl script for programing device's.
I would like to print a document from baan-sesion to the 2 difrent device's at the same time. One is on PDF.file and the other is to push the data to the printer. I have already made a device for meke a .PDF file.
This device have a device script in wich after the .PDF file is complete I would like to start automaitc new device for printing the document through the printer.
mark_h
6th March 2008, 16:01
How does your device driver work? Typically when you trap a report with the device driver you have a tmp file to work with. In my case we convert it to ASCII, then manipulate the report. If I wanted to I could execute an lp command against the ASCII converted temporary file - we do UNIX printing. Of course you would have to make sure that the ascii version of the file would print correctly.
Darren Phillips
6th March 2008, 17:54
It is possible to do this without any baan code. I used a virtual printer Redmon http://pages.cs.wisc.edu/~ghost/redmon/
and ghostscript http://pages.cs.wisc.edu/~ghost/ to do the PDF file.
The virtual printer is set to use postscript driver printer so it creates postscript file. The virtual printer then calls a batch file that sends the postscript file to ghostscript which creates a PDF file. Then sends the file onto a printer and in my case another program called Blat http://www.blat.net/194/ emails the pdf file.
csecgn
6th March 2008, 21:53
Did you also use brp.ready twice?
Like:
...
brp_id1 = brp.open( "rtccom0401010003", "DEVICE 1", 1 )
brp_id2 = brp.open( "rtccom0401010003", "DEVICE 2", 1 )
select ...
selectdo
...
brp.ready(brp_id1)
brp.ready(brp_id2)
...
endselect
brp.close(brp_id1)
brp.close(brp_id2)
...
You can use brp.open.language also. But you cannot use spool.device as a variable (spool.device will allways contain the last printer). Insert the device name directly.
hth
Regards
Christof
tadina
7th March 2008, 12:44
OK I used shell comand
shell("qprt -Pemeco -c -Z! -dp -N1 "&str$(tmp.file),0)
But I still have a problem. Now my problem is format of report???
So I used:
shell("filter6.1 -p ibm_4226 -c 2 -f 1 -t 999999 -i "&str$(tmp.file)&" -o $BSE/tmp/tmpoutputfile -l 72 -m 1 -n 0 -L ISO-8859-1",0)
but still have problem with same character's like ,,č....
Any sugestion???
csecgn
7th March 2008, 21:51
For my experience this is a codepage problem.
Are you sure that ISO 8859-1 is the correct codepage for you? You wrote you are from slovenia. So I think ISO-8859-15 or ISO-8859-4 could be better. I didn't find the characters you are missing in ISO 8859-1 but in 8859-15.
Look at wikipedia for codepages.
hth
Regards
Christof