Using Preprinted FOrms
Posted in 2001
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
Version: 7.31 OS: AIX 4.3.3 Printer: HP4000TN I have been given the joyful task of making our Informix 4GL 1099 print program work with the prepriinted 1099(MISC) forms. I figured out how to make it work IF the printer were being dealt with directly by AIX BUT our setup uses Novell to handle printing. The problem is that Novell apparently strips the top/bottom margin resets (to zero), prints approx. 1/2" each at the top/bottom of the page with a very non-standard 66 lines in between! I think I could make it work if I could figure out how to issue a hard form feed at the end of each third form instead of spacing to the top of the fourth form (which is the first form on the next 8.5 x 11 sheet). Questions: 1. Is there any way in the Informix 4GL to issue commands for every nth (3rd here) row of the SELECT? (Each row represents one full 1099 form.) 2. How would one send a hard FF (0x0C) in the report output? (In case you can't tell, I'm rather new to Informix 4GL!) Thank you, Lucky Lucky Leavell Phone: (800) 481-2393 or (812) 366-4066 UniXpress - Your Source for SCO FAX: (888) 231-9640 or (812) 366-3618 1560 Zoar Church Road NE Email: lucky@UniXpress.com Corydon, IN 47112-7374 WWW Home Page: http://www.UniXpress.com
Lucky, Im not sure of an 0xff but you can create a ^L (which is what is usually used for a page feed) like this: LET formfeed = ^L It has to be a real control-L in vi (sorry, I dont know how to do this in any other editor) enter a ctrl-v ctrl-L. Then just set a counter and PRINT formfeed every three lines (using a mod function or resetting the counter after it hits 3). I think there is an internal counter that can be used -- but I can't of which off the top of my head and it may be faster to just create a new one than figuring out what is already there. However, I think you will have problems with this method; when the internal line counter hits 66 (the default) I think you are going to get an additional line feed. Have you tried fiddling with the PAGE LENGTH statement? Id start fiddling with the following (if you havent already) before trying to out-fox Informix with your defined form feed: OUTPUT PAGE LENGTH 33 TOP MARGIN 0 BOTTOM MARGIN 0 Tom "Lucky Leavell [RIS]" wrote: > Version: 7.31 > OS: AIX 4.3.3 > Printer: HP4000TN > > I have been given the joyful task of making our Informix 4GL 1099 print > program work with the prepriinted 1099(MISC) forms. I figured out how to > make it work IF the printer were being dealt with directly by AIX BUT our > setup uses Novell to handle printing. The problem is that Novell > apparently strips the top/bottom margin resets (to zero), prints approx. > 1/2" each at the top/bottom of the page with a very non-standard 66 lines > in between! > > I think I could make it work if I could figure out how to issue a hard > form feed at the end of each third form instead of spacing to the top of > the fourth form (which is the first form on the next 8.5 x 11 sheet). > > Questions: > > 1. Is there any way in the Informix 4GL to issue commands for > every nth (3rd here) row of the SELECT? (Each row represents > one full 1099 form.) > > 2. How would one send a hard FF (0x0C) in the report output? > > (In case you can't tell, I'm rather new to Informix 4GL!) > > Thank you, > Lucky > > Lucky Leavell Phone: (800) 481-2393 or (812) 366-4066 > UniXpress - Your Source for SCO FAX: (888) 231-9640 or (812) 366-3618 > 1560 Zoar Church Road NE Email: lucky@UniXpress.com > Corydon, IN 47112-7374 WWW Home Page: http://www.UniXpress.com