Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>rl.exe create report and label forms</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
RL.EXE             Create REPORT and LABEL FORMs

Syntax:        RL

Description:   RL.EXE allows you to create or modify LABEL FORM (.lbl)
               or REPORT FORM (.frm) files.

LABEL FORM:    The (.lbl) is a binary definition file that stores a
               label definition executable with the LABEL FORM command.
               Each label definition consists of dimension and
               formatting attributes and one or more content
               expressions.

               In the RL system, the (.lbl) is created by the
               user-defined function Lbl_save().

               Label width: The width setting determines the print
               area of a label contents expression and can be up to a
               maximum of 255 characters.

               Label height: The height determines the number of
               contents expressions the label definition will contain.
               This value can be anywhere in the range of one to 16.

               Left margin: The left margin setting specifies the
               first print position of the leftmost label.  On the
               console device, this begins with column zero.  On the
               print device, this begins with the current MARGIN
               SETting.

               Lines between labels: The number of lines between
               labels determines the number of blank lines printed from
               the bottom of the current group of labels to the top of
               the next group of labels.  This is analogous to a footer
               margin.

               Spaces between labels: The spaces between labels
               setting determines the number of spaces printed between
               labels if the number of labels across is greater than
               one.  This setting can be used to set the left margin for
               labels after the first label.  In this case, left margin
               might have the same value as space between labels.

               Labels across: The labels across setting determines
               the number of labels printed as a group across the page.

               Remarks: This is a comment field that can contain any
               text describing the label definition.  Selecting a
               pre-defined label format from the Format pop-up menu,
               fills Remarks with the format definition selected.


Table: Attributes of Pre-defined LABEL FORM Definitions
-----------------------------------------------------------------------------
  Remarks                        Width Height Across Margin Lines Spaces
-----------------------------------------------------------------------------
  3 1/2 x 15/16 by 1             35    5      1      0      1     0
  3 1/2 x 15/16 by 2             35    5      2      0      1     2
  3 2/10 x 11/12 by 3 (Cheshire) 32    5      3      0      1     2
  4 x 17/16 by 1                 40    8      1      0      1     0

  ---------------------------------------------------------------------------
  Max values                     255   16     255    255    255   255
  Min values                     1     1      1      0      0     0

-----------------------------------------------------------------------------

               Contents: Contents expressions are expressions of any
               type and can be up to 60 characters in length.  The
               maximum number of contents expressions that can be
               defined per label is 16.  The results of contents
               expressions can be any length, but results longer than
               the specified contents width are truncated when printed
               by LABEL FORM.

               . Note: For multiple across labels, the last label
                 contents printed on a line is trimmed.

               . Warning: In Clipper, the LABEL FORM contents does
                 not support a list of expressions delimited by commas.
                 If more than one expression is specified, a
                 Miscellaneous runtime error occurs returning the info
                 message, "expression error (in .LBL)."

               Blank lines: LABEL FORM lines whose contents
               expressions evaluate to empty are suppressed.  To force a
               blank line when this situation occurs, use the following
               IF() expression:

                    IF(!EMPTY(<expC>), <expC>, CHR(255))

               or create a user-defined function that performs the same
               action:

                    FUNCTION NoSkip
                    PARAMETERS exp
                    *
                    RETURN IF(!EMPTY(exp), exp, CHR(255))

               Blank contents expressions generate blank lines when
               encountered by LABEL FORM.  This facility allows the
               definition of LABEL FORM layouts that include blank
               lines.

REPORT FORM:   The (.frm) is a binary definition file that stores a
               report definition executable with the REPORT FORM
               command.  Each label definition consists of dimension and
               formatting attributes and one or more content
               expressions.

               In the RL system, the (.frm) is created by the
               user-defined function Frm_write().

               Layout formatting

               . Page header: The page header is a four-line literal
                 string printed on the top and center of each page if
                 the Plain page option is "No," or the PLAIN clause is
                 not specified as a part of the REPORT FORM statement.

               . Page width: The page width setting determines the
                 number of characters allowed for the combined widths of
                 all report field definitions.  The default is 80.

               . Left margin: The left margin setting determines the
                 number of characters the report is indented.  If
                 directed to the printer, the offset is in addition to
                 the MARGIN SETting.  The default is 8.

               . Right margin: The right margin setting performs no
                 useful function.  The default is 0.

               . Lines per page: The lines per page setting
                 determines the total number of lines Clipper prints per
                 page.  This includes the page heading, column titles,
                 detail lines, and total lines.  The default is 58.

               . Double spaced: The double space setting determines
                 whether detail lines are double spaced when printed.
                 The default is "No."

               Layout printer directives

               . Page eject before print: This setting determines
                 whether a form feed character (CHR(12)) is sent to the
                 printer prior to the first report line.  This setting
                 is overridden by the EJECT clause of REPORT FORM.  The
                 default is "Yes."

               . Page eject after print: This setting determines
                 whether a form feed character is sent to the printer
                 after the last report line is printed.  The default
                 setting is "No."

               . Plain page: This setting corresponds to the PLAIN
                 clause of REPORT FORM.  If Plain page is set to "Yes,"
                 the page heading, page number, and report date are not
                 printed with the page title printed only on the first
                 page.  In addition, there are no further page breaks.
                 The default is "No."

               Groups: This option allows you to define two levels
               of hierarchical grouping of records for the current
               report definition.  A group is defined as a set of
               consecutive records having the same key value as defined
               by the group on expression.  Whenever there is a change
               in a group key value, a group footer line is printed with
               sub-totals for numeric report fields specified with
               Totals set to "Yes."  Whenever a new group value begins,
               the group header is printed.

               . Group on expression: Specifies the group expression
                 defining the top-level group.

               . Group heading: Specifies a literal string to print
                 with the current group expression value prior to
                 printing new group's detail lines or sub-group heading
                 lines.

               . Summary report only: Determines whether detail
                 records are printed if there is Group on expression
                 defined.  The default value is "No."

               . Page eject after group: Determines whether there is
                 a page eject after a change in the Group on expression
                 value.  The default value is "No."

               . Sub-group on expression: Specifies the group
                 expression defining the second-level group.

               . Sub-group heading: Specifies a literal string to
                 print with the current sub-group on expression value
                 prior to printing new sub-group's detail lines.

               Field definitions: Field definitions define report
               columns.  Each report field definition consists of a
               contents expression of any data type, a literal heading
               string, and a width parameter.  The set of report
               definitions defines the detail line to print for each
               record.

               . Contents: The contents contains the expression for
                 a single report field.  If a contents expression
                 returns a character value longer than the Width
                 setting, the string wraps within the current column
                 boundaries.  To force a line break and wrap the rest of
                 the column to a new line, embed a semi-colon (;) within
                 the string.

                 The maximum number of report fields is 24.

               . Heading: The heading definition is a literal string
                 of up to four lines per report field definition.

               . Width: This setting defines the width of a report
                 field column.  If the type is numeric and the Decimals
                 setting is greater than zero, the Width includes the
                 decimal point and the decimal digits.  The default
                 width is 10.

                 If the contents value exceeds the Width and the type is
                 character, it is wrapped to the next line in the
                 column.  If the type is numeric, asterisks (*) display.

               . Decimals: If specified, Decimals defines the number
                 of decimal digits to display if the report field type
                 is numeric.  The default is zero.

               . Totals: Determines whether the current report field
                 is totalled if the type is numeric.  The default is
                 "No."

                 There are three levels of totalling a numeric report
                 field that you can have if the Totals setting is
                 "Yes."  First, a grand total prints after all other
                 report lines print.  If there are Group on or Sub-group
                 expressions defined, a subtotal prints for each level
                 grouping.

Notes:         . RL is provided as source code and must be compiled and
                 linked with CLIPPER.LIB and EXTEND.LIB.  To perform
                 this operation, use MAKERL.BAT.

                 Note: MAKEDBU.BAT assumes that both CLIPPER.LIB and
                 EXTEND.LIB are located are located in \CLIPPER.

               . Source files:

                 Rlfront.prg
                 Rlback.prg
                 Rldialog.prg

See Also: LABEL FORM REPORT FORM

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson