[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Output formatting for HP printers from client side



Donnell,

> On Fri, Dec 18, 1998 at 04:52:27PM -0800, Donnell Rogers wrote:
> > I am using SQR 3.x on a SYBASE/AIX server and am trying to run a client-side
> > SQR report.   The client is running SQR on Windows 95.
> >
> > I am having trouble formatting the report.
> > Standard SQR print phrasing such as :
> >
> > print 'nancy' (1,1)     ! line one, column one
> > print 'bob' (0,0)       ! same line, immediately following previous
> >
> > is not producing the expected    nancybob    on the output.
> > Instead the output looks like:  nancy   bob  .  There are 2.5 columns
> > separating the names.
> >
> > The SQR call includes  -PRINTER:HP

I think an earlier respondent commented that this was a proportional
font problem.  This is usually true, although you can get the problem
using a fixed-width font also.  It depends on the cell-size in your
declare-layout.

Basically, when you specify the char-width and line-height, you're
specifying the width and height of each cell in the coordinate system
used by PRINT.  When you say "PRINT 'nancy' (1,1)" you're printing
the string 'nancy' using the current font at location (1,1), and
advancing the _next_ start location to (1,6) because 'nancy' is
five characters wide.  Thus, 'bob' starts 5 char-widths to the
right of where 'nancy' started, REGARDLESS of what font-sizes
you actually use for 'nancy' or 'bob'.

IF you're using a fixed width font AND the CHAR-WIDTH you specify
in DECLARE-LAYOUT matches the actual width of the font, ONLY THEN
would you get 'nancybob'.  If you're using a proportional font
OR if you are using a fixed font that's different in width from
your declared CHAR-WIDTH, THEN you should do something like this
if you want 'nancy' and 'bob' to appear without spaces:

   LET $temp = 'nancy' || 'bob'
   PRINT $temp (1,1)

If you're wanting to print 'nancy' and 'bob' in two different
type styles and still have them appear contiguously, you may have
to resort to a much smaller char-width (i.e., 1 point) and do all
the font-metrics yourself.

Hope this helps.

Ray
----------------------------------------------------------------------
Ray Ontko       |  Ray Ontko & Co  |  "Time for a new signature line."
rayo@ontko.com  |  Richmond, In    |  See us at http://www.ontko.com/