Printer Control Codes and Reports - Reply
Posted in 1993
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
>From Greg Woodard: > I am trying to print 4GL reports to an HP laserjet III printer hooked > up to a Sun Sparc IPX. I have problems getting the printer to print > landscape, legal documents. Is there any way to imbed printer control > codes for a printer into a 4GL report??? Informix mentioned using a C > external or program. Has anyone written such code or fought this > problem??? / Greg Woodard (wood@genesis.mcs.com) Greg, in 4GL you can send whatever you'd like to the printer in print statements. To send escapes (and other non-printable characters) use the ascii function, as in print ascii(27),"&l1O" -- send a "landscape" command to an HP printer Of course, such setup commands should go near the beginning of the first page header of your report. We've used similar commands to set the fonts and paper sources with our printers. ______________________________________________________________________ ``The opinions Jeff Hecker / U.S. Senate / Washington DC 20510 expressed are soley Jeff_Hecker@GJM.Senate.Gov those of the participants'' (202) 224-5344