I have read and got a few ideas
for a solution to another one of our software shortcomings. Basically,
each employee is required to log time in various jobs, with activities.
At the end of their shift, a "Shift Summary Report" prints at a printer
we define for the employee with our software. Our plant supervisors,
would also like this report printed in the main production office.
Since our software has no way of doing this, I decided to hack up the
interface script to provide this feature. Here's what I have so far:
from "dumb line printer":
--- various lines cut ---
for file in $files
do
0<${file} eval ${FILTER} 2>&1
# Hack by B. Garlock to print to convt printer if
# report is a Shift Summary
convert=`head -2 $file | grep "Shift Summary
Report" | cut -c57-77`
if [ "$convert" = "Shift Summary Report" ]
then
lp -d convt $file 1>/dev/null 2>&1
fi
--- more lines cut ---
So, the hack properly identifies the proper report, and sends it to the
convt printer, which is what I want. The problem is, that it does not
print in "condensed" mode on the HP laser printer (the convt printer is
a HP Laserjet 2100). It prints fine on the printer when the employee
ends their shift.
The printers that the employees have their Shift Summary's print on, are
dot matrix, so maybe that has something to do with my problem. The
reports properly go into condensed mode on the dot matrix, but not when
I send it to the laser printer using the hack, however they do properly go into condensed mode if I set the laser printer up as the main Shift Summary printer. I'm thinking that I need to pass the file to the other printer in another way, but I'm, not sure how. Bruce Garlock
bruceg@tiac.net
for a solution to another one of our software shortcomings. Basically,
each employee is required to log time in various jobs, with activities.
At the end of their shift, a "Shift Summary Report" prints at a printer
we define for the employee with our software. Our plant supervisors,
would also like this report printed in the main production office.
Since our software has no way of doing this, I decided to hack up the
interface script to provide this feature. Here's what I have so far:
from "dumb line printer":
--- various lines cut ---
for file in $files
do
0<${file} eval ${FILTER} 2>&1
# Hack by B. Garlock to print to convt printer if
# report is a Shift Summary
convert=`head -2 $file | grep "Shift Summary
Report" | cut -c57-77`
if [ "$convert" = "Shift Summary Report" ]
then
lp -d convt $file 1>/dev/null 2>&1
fi
--- more lines cut ---
So, the hack properly identifies the proper report, and sends it to the
convt printer, which is what I want. The problem is, that it does not
print in "condensed" mode on the HP laser printer (the convt printer is
a HP Laserjet 2100). It prints fine on the printer when the employee
ends their shift.
The printers that the employees have their Shift Summary's print on, are
dot matrix, so maybe that has something to do with my problem. The
reports properly go into condensed mode on the dot matrix, but not when
I send it to the laser printer using the hack, however they do properly go into condensed mode if I set the laser printer up as the main Shift Summary printer. I'm thinking that I need to pass the file to the other printer in another way, but I'm, not sure how. Bruce Garlock
bruceg@tiac.net