Re: Page Line Length
Posted in 1995
> spuffer@clark.net (M J Spuffer) writes: > I'm a new kid to the the Informix world. My group is just learning about > 4gl and all it's tricks. Having lived in the Pick world for many years, > its quite and adjustment. Now for the question: How do you write one > report which will run on a lazer printer (57 print lines) or a line > printer (66 lines) without replicating the entire report section? At > first thought and IF statement around the PAGE LENGTH statement would > seem proper, but to no avail. Any ideas would be appreciated. There is no way to set the page length at runtime in 4GL. (Yes, that is incredible, but it is still the case - it's fixed in NewEra.) What we do is send an initialisation string to the laser printer that sets the page size and line hight so it also prints exactly 66 lines (or 72 lines here in Europe) per page. This doesn't work 100% if you are dependent on 6 lines to the inch to fill in preprinted forms. We therefor have some extra codes that will move the print up or down by some small amounts to hit the right place on the form. (Remember to allways move back again the same amount afterwards so the rest of your printout is correct.) We obviously always print these codes, but sets them to null for lineprinters. There are many ways to set up such codes. We read them from the database. Others print "standard" codes and replace them in a Unix printer filter. Other systems are probably also used, just don't do print ascii(whatever). There are to many different printer code sets for that. Nils.Myklebust@ccmail.telemax.no NM-data, Dalsbergstien 7, N-0170 Oslo, Norway My opinions are those of my company