BEGIN {
FS = "," ;
print "report_title=Employees report Example with Awk";
print "orientation=2";
print "open_view";
print "spacing=250";
print "$c0=400";
print "$c1=1000";
print "$c2=3400";
print "$c3=6800";
print "$c4=8400";
print "$c5=11000";
print "$c6=13000";
print "$c7=13200";
print "[header]";
print "{f=arial;s=8}";
print "{pic=c:program filesrpvsamplesrpvlogo.bmp,400,400,1400,900}";
print "{n;$c7} Page {12800;pag}";
print "{s=16;n;1800;c=2;b=y} Sample Application Report {spacing=350;n}";
printf "{c=1;1800} Employees Report (one line per record).n"
printf {c=0;b=n;n;n;n}n";
print "{LINE=400,14000;n}";
printf "{s=8;b=y;$c0} ID {$c1} Name {$c2} Address {$c3} Phone {$c4} E-mail" printf "{$c5} Birth date {a=r;$c6} Mon Salary {a=l;$c7} Schedule"
printf "{b=n;spacing=375;n}n";
print "{LINE=400,14000;n}"
print "[data]"}
{
printf "{$c0}" $1
printf "{$c1}" $2
printf "{$c2}" $3
printf "{$c3}" $4
printf "{$c4}" $6
printf "{$c5}" $7
printf "{a=r;"
{ if($8 < 1400)
{
printf "c=12;"
}
}
printf "$c6}" $8 "{c=0;a=l;$c7}" $10 "{n}n"
}
|