r_nagu
24th October 2002, 15:49
Hi,
With the help of postings on this board I was able to modify our Sales Invoices to print with the company logo (used a font) on them. It works great when they print em manually using a Windows Printer.

But, now we would like to change the job which prints these invoices to print with the logo. So, I changed the printer device to windows printer. When the job is started manually by using session Activate job (ttaad5203m000) everything works fine but, when we run the jobs In queue using the job daemon, the jobs just stays at Running status and report just hang. They show up as premature in device queues.

Any ideas what might be happening?

Appreciate your help.
NS

evertsen
24th October 2002, 17:12
Unfortunately, I don't think you can use a windows printer from a job. The report needs to be sent to a PC so that Bwprint can take over and then send the report to a windows printer. When the job daemon handles the job, you take the PC out of the loop and the report has no place to go (therefore the job hangs). In order to get this working, I think you'll have to look into a solution to print your logo through a direct printer (i.e. through UNIX if that's your operating system) or (though I've never tried this) you can make sure that the job owner is always logged into Baan so the job can use that PC.

GaryEd
24th October 2002, 21:50
Is that really a true statement? I have tried many times (unsuccessfully) to print to a windows printer from a job. I gave up and just print to an ASCI file. I thought it was my general lack of intelligence but if it is really not possible at all I don't feel so bad anymore.

evertsen
25th October 2002, 00:44
It is true for UNIX anyway. I think there is a workaround in NT though.

donsrini
25th October 2002, 02:42
Baan 5.0b
Server: Win 2k

Yes, it is possible to print to a network printer from a job. We did NOT use the Baan Job demon. We used the windows scheduler to schedule our Baan jobs on the application server.

If the application server is loged in the same domain (or a trusted domain), the we can print to any network printer.

r_nagu
25th October 2002, 16:00
Thanks for your feedback.

So, now we know that we can not set up a job that prints using a windows printer because of the BW client not being present (on UNIX server). The way out is to somehow (I don't know how yet) run this job on a local PC so that it can use bwprint. I am thinking ( I might be completely wrong here) that, I will create a 3 GL script with AFS to activate this Job and have this session as the startup up session of a baan login and use the windows standard “Scheduled Tasks” feature to setup this task to login in to this account which in turn will run this 3 GL script. I might not get any where with this but, I will try and see what happens.

Thanks again,
NS

Markus Schmitz
25th October 2002, 16:32
Actually the whole issue is not so myterious:

If (on unix) a job is started, then this happens either via the job daemon or via the script rc.startjob in cron.

If you look at both, then you will see, that these are actually scripts, which call ba6.1 with a specific session.

But obviously ba6.1 can not print on a windows printer.
Finished! No configuration will ever enable this.

But if you can achieve the effect on a Baan on NT installation with the windows scheduler, then you can do the same on Baan on UNix Installation, by just scheduling a bw-gui on any PC to connect to the unix box, right?

No need for AFS and so on.

Enjoy

Markus

r_nagu
25th October 2002, 16:49
Markus,
Could you please explain a little bit more on this statement.

"But if you can achieve the effect on a Baan on NT installation with the windows scheduler, then you can do the same on Baan on UNix Installation, by just scheduling a bw-gui on any PC to connect to the unix box, right?"

Thanks,
NS

Markus Schmitz
28th October 2002, 10:00
Ok, naturally I have not tried this, but the basic idea is as follows:

a) There is nothing like a job daemon binary in Baan neither in unix nor in NT. A Job daemon in Baan is a interface (bw or ba), which talks to a bshell, which starts a specific Baan Session. This Baan session ttaad5203m000 uses AFS to start programs defined in Jobs.

b) Normally this interface is running locally on the application server, but this is not an requirement.

c) On Windows you can start jobs from batch scripts, by configuring an appropriate bwc file (specifying username, password, host and so on) and starting the GUI with some parameters. (See attached file)


Conclusion: It should be possible for an unix installation to follow the guidelines of "how to start Baan jobs from a MS DOS batch and the scheduler" and just changing the host name on the bwc file.

Give it a try, curious for the feedback,

Markus

kereni
30th October 2002, 11:11
In the past I successfully ran a print job using windows printer as the followings:
- Install latest porting set
- Install latest BW on the server
- Go to control panel -> services and change the startup settings of BaanJobDeamon to start using user 'baan' (for example)
- Logon to the server using user 'baan'
- Add a windows printer
- Change the jobd.bwc settings to run as user 'baan'
- Execute the job.