mig28mx
6th December 2008, 01:36
Hello all,
I´m facing with the following problem:
In baan IV I have a device that takes the output of a report session and sent to an application that convert it to excel.
After migrate to linux, that program not work any more. I have changed the version to linux without success.
Device type: file rewrite
The program uses the 4GL program: ttstpconv
Argument: ASCII\fap %s; rm %s
I´m suspecting that in linux, the %s not contain the filenename.
Why in baan uses %s to store the output filename? Perhaps, it depends on the OS? Can I change it to other?
Thank you,
Han Brinkman
6th December 2008, 10:22
Are you sure?
What's that fap command doing that you specified?
Regards,
Han
mig28mx
8th December 2008, 16:59
Hello Han
Fap is an external printing program, that we use to format some outputs, by example, for our invoices.
When I run that program from ouside baan, the programs run perfectly, by example:
fap output.txt
Takes output.txt and applies a specific format. That´s why I suspect that in device definition %s, parameter is empty.
Any ideas?
jclju1
8th December 2008, 17:44
Are you sure that users can start fap program? What if you add path in line?
I am not sure that this syintax is correct:
Argument: ASCII\fap %s; rm %s
Try
Argument: ASCII:fap %s; rm %s
or
Argument: ASCII:/directory_where_fap_is_located/fap %s; rm %s
mig28mx
8th December 2008, 19:15
Thank you jclju1,
I have tried you suggestion. I´m sorry to say, but when I add a ":" after word ASCII, it appear a message that says:
Convertion to ASCII is not supported.
Any other idea?
Thank you in advance.
NPRao
8th December 2008, 20:20
Change your printer to a Direct Device.
Refer to the Tools Session help on the device type:
Possible values
Printer
A physical printer in a UNIX environment. The report is sent to a temporary file on the ERP LN server and queued for printing to the physical printer. The ERP LN printer daemon is used to control the print request.
Logical printer
A group of physical Unix printers. The report is sent to a printer in this group.
Append to file
A file on the ERP LN server in which a report is stored. If the file does not exist, the file is automatically created. An existing file is appended.
Rewrite file
A file on the ERP LN server in which a report is stored. If the file does not exist, the file is automatically created. An existing file is overwritten.
Direct
A physical printer in a UNIX environment. The report is directly sent to the printer. The print request is not controlled by the ERP LN printer daemon.
Screen
The report is sent to the computer screen to show a preview of the report.
Windows Printer
A physical printer that is supported by Microsoft Windows. The report is sent to the users PC. The ERP LN Windows print tool BWPrint is activated and directs the report to the selected printer.
Mail API
This option is only available on a Windows platform. It is not maintained anymore and will be deprecated in the future.
Windows Server Printer
A physical printer that Microsoft Windows supports. The printing is handled by a separate Windows printer server with the Infor ES Reporting Service installed. Users do not need the BWPrint software on their client PCs. You must specify the printer server name and the port number for the ES Reporting Service in the Argument field. For details, refer to Windows printer devices.
mig28mx
8th December 2008, 20:36
Thank you NPRao,
I have tried you suggestion, but, if I use direct device, I can´t specify the use of 4GL program, to admin my formats, that is done by using ttstpconv 4GL program.
Any other idea?
Thank you in advance.
NPRao
8th December 2008, 22:29
I have tried you suggestion, but, if I use direct device, I can´t specify the use of 4GL program, to admin my formats, that is done by using ttstpconv 4GL program.
I am not aware of your program's formatting features but you can create your own custom program and add to the device data options:
Date : 12-08-08 [12:26, Ame] Device Data (Extended) Page : 1
BaanERP_Tools7.6a Company : 000
--------------------------------------------------------------------------------
Device : EXCEL
Device Type : Rewrite file
Driver :
Description : Excel
System Queue :
Paper Type :
Page Length : 50
Left Margin : 0
Path :
Change Output file allowed : No
Conversion Program : ozmadmexcel
Argument for Conversion Program :
Form Feed Every Page : No
Locale : ISO-8859-1
Intermediate File in XML Format : No
In your 3-GL program you can then activate the ttstpconv and get the output file and send to your device. You can also add code if you want to change any more settings.
function main()
{
string fname(256)
fname = creat.tmp.file$( bse.tmp.dir$() )
wait.and.activate("ttstpconv", argv$(1), fname, "ASCII", argv$(4))
send.to.excel(fname)
e = file.rm(fname)
}
mig28mx
3rd June 2009, 17:43
Hello all,
The problem was solved re-compiling, the source code of the external conversion program under Red Hat environment.
The program was created in C and in order to have it working, it was compiled using the Red Hat´s C compiler.
Regards.