Re: Printing Right Justified 4GL Reports
Posted in 1997
NILIMA_DESAI@HP-SanJose-om1.om.hp.com wrote: :Item Subject: cc:Mail Text : Is their a way to PRINT a field right-justified in Informix 4GL : reports? : : If their is, I am sure it is something really simple, but I don't know : what it is. I would really appreciate some valuable input on this. What datatype? If it's any numeric type simply use something like: print l_variable using "#######&.&&" or any of the many variants from the manual. If it's character data it's harder. You have to find the length of whatever you are printing and calculate where to start for yourself. One way might be: let l_colno = fieldlength + offset - length(l_variable) where fieldlength is the size of the field you want to print right justified within, offset is the position where this field starts on the line. Of course you can precalculate fieldlength + offset and put in whatever litteral result you get. Then you simply print like this: print column l_colno, l_variable clipped The "clipped" is essential, particularly if you want to print more data on the same line. Nils.Myklebust@idg.no NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway My opinions are those of my company The Informix FAQ is at http://www.iiug.org