Jim

Bless you!  I had NOT had an answer and am going up to this client's site
tomorrow!

David Blocker


----- Original Message -----
From: "James (Jim) Bentley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 08, 2002 7:19 AM
Subject: Re: Lines wrapping on R:Base 6.1A DOS


> David,
> I don't know if you found an answer to this question. It
> took me a while to locate the reference in legacy documents.
>
> Please note that is was written before nesting of functions
> was allowed.  I would use the following report expression
> instead:
>  vBorder TEXT = (SFIL(CHAR(179), (NINT(1 + (SLEN (note_field)
> / 40)))))
>
> or better still I would use a view that includes creating
> the above value.
>
> the following is the legacy article:
>                                 DOCUMENT #718
>
=======================================================================
>      DRAW LINES AROUND VARIABLE LENGTH FIELDS
>
=======================================================================
>      PRODUCT:  R:BASE                   VERSION :  3.1 or
> Higher
>
=======================================================================
>      CATALOG:  Reports                  AREA    :  Drawing
> Lines
>
=======================================================================
>
>
>      Lines are often used in a report to emphasize a section
> of text and set
>      it apart from the rest of the report. It's easy to draw
> lines in R:BASE
>      reports using the Draw option on the menu. The lines
> are placed in the
>      report definition as text; they are not part of the
> field location. This
>      works fine for fields that are located for a specific
> size. But when you
>      locate a TEXT or NOTE field using just the W marking
> to indicate wrap for
>
>      as many lines as there is data, the lines are only printed
> for the first
>      and last lines of data. R:BASE only wraps the data,
> it does not wrap
>      other text on the line.
>
>      To have the report "draw lines" around all of a variable
> length TEXT or
>      NOTE field use a TEXT variable instead of the line draw
> character on
>      each end of the field location.  The variable contains
> one line draw
>      character for each line of data that wraps. The variable
> is itself
>      wrapped and thus prints alongside the data.
>
>      Step 1
>      =======
>      Create a lookup table to hold the line draw characters.
> The lookup
>      table has two columns, an INTEGER column for the number
> of lines and
>      a TEXT column to hold that number of line draw characters.
> For example:
>
>        CREATE TABLE Borders (numline INTEGER, border TEXT
> 20)
>
>      The TEXT column length must match the maximum number
> of lines printed
>      for the field to be wrapped. The table defined above
> draws lines around
>      fields wrapped up to 20 lines long.
>
>      Step 2
>      =======
>      Next, determine the ASCII code of the line draw character.
> If the
>      lines are single line borders, use ASCII code 179, for
> double line
>      borders, use ASCII code 186.
>
>      Step 3
>      =======
>      Load the Borders table with data. Enter consecutive
> numbers (to number
>      each row) in the numline column. Enter that many line
> draw characters
>      in the border column. Make sure you enter enough rows.
> For a single-line
>      border around a field that will be a maximum of 10 lines
> long, load the
>      Borders table with this data:
>
>        numline          border
>        -------          -------
>          1              |
>          2              ||
>          3              |||
>          4              ||||
>          5              |||||
>          6              ||||||
>          7              |||||||
>          8              ||||||||
>          9              |||||||||
>         10              ||||||||||
>
>      The data can be loaded by selecting the Borders table
> from the Info
>      menu. To enter the single line character, hold down
> the [Alt] key and
>      press 179 on the number pad. The Copy data option can
> be used to make
>      data entry quicker. Alternatively, the LOAD command
> can be used from
>      the R> prompt.
>
>      Step 4
>      =======
>      Modify the report. Define two new variables in the report,
> one to
>      compute how many lines the field wraps on, and one to
> lookup the
>      matching number of line draw characters. For example,
>
>        vnumline INTEGER = ((SLEN(note_column)) / 40 + 1)
>        vborder = border IN borders WHERE numline = .vnumline
>
>      The variable vnumline equals the number of lines required
> to print
>      the note_column column for a given row. It is calculated
> as follows:
>      SLEN finds the number of characters of data in the column
> for that
>      particular row, that value is divided by the located
> width (40) and
>      one is added to account for the last line. The variable
> vborder
>      contains the same number of line draw characters as
> there are lines
>      to print.
>
>      Locate vborder at both ends of the location for the
> note_column
>      column. You can locate vborder on top of the existing
> line draw
>      characters. Locate vborder only one character wide by
> pressing S
>      to mark the beginning, backspace, press W (on top of
> the S) to wrap,
>      and then press [ESC] twice. This wraps the border lines
> as the text
>      is being wrapped. The report format might look like
> this:
>
>                      two locations for vborder
>                   /                              \
>                 /                                 \
>                |                                   |
>        D       +-----------------------------------+
>        D       WS                                 WW
>        D       +--------------|--------------------+
>                               |
>                       location of the wrapping column
>
>
>      If you have data that still doesn't print a complete
> box for some
>      rows of data try SET WRAP OFF. With WRAP ON, fields
> may wrap with
>      extra spaces causing the line count to be wrong.
>
>
>
>
>
> --
> Jim Bentley
> American Celiac Society
> [EMAIL PROTECTED] - email
> (973) 325-8837 voice
> (973) 669-8808 Fax
>
>
> ---- "David  Blocker" <[EMAIL PROTECTED]> wrote:
> > I know, I know - we need to get these guys upgraded!
> >
> > User is using R:Base 6.1A for DOS.  IN a report, where
> > we've drawn lines
> > around data in a D section, if the data in any field wraps
> > to more than one
> > line, the vertical lines do not display.  Yet I distinctly
> > remember there
> > WAS a way to do this under DOS but can't for the life of
> > me remember how. -
> > and recent postings imply this is true.
> >
> > Can anyone help?
> >
> > David Blocker
> >
> >
> > ================================================
> > TO SEE MESSAGE POSTING GUIDELINES:
> > Send a plain text email to [EMAIL PROTECTED]
> > In the message body, put just two words: INTRO rbase-l
> > ================================================
> > TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
> > In the message body, put just two words: UNSUBSCRIBE rbase-l
> > ================================================
> > TO SEARCH ARCHIVES:
> > http://www.mail-archive.com/rbase-l%40sonetmail.com/
> >
> ================================================
> TO SEE MESSAGE POSTING GUIDELINES:
> Send a plain text email to [EMAIL PROTECTED]
> In the message body, put just two words: INTRO rbase-l
> ================================================
> TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
> In the message body, put just two words: UNSUBSCRIBE rbase-l
> ================================================
> TO SEARCH ARCHIVES:
> http://www.mail-archive.com/rbase-l%40sonetmail.com/

================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/

Reply via email to