Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- RLIB 3.0a Reference - <b>function:</b> reportinit() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Function:    REPORTINIT()

Purpose:     Initialize the PRINTERS and REPORTS StartReport() databases.

Syntax:      REPORTINIT( [ create ] )

Arguments:   create      - Optional logical value which if supplied, and
                           is True, the databases will be created even if
                           they already exist.  The default value is
                           false, which means the databases will be
                           created and filled with data only if they do
                           not already exist.

Returns:     Logical true if databases created successfully and/or if they
             currently exist, or False if they do not exist and an error
             occurred when attempting to create and/or append records.

Description: REPORTINIT() is a printer/database function that is used to
             generically set up two database files that are used by the
             StartReport() RLIB function.  These two files, a description,
             their structures, and field contents follow.

             PRINTERS.DBF - This database contains printer names and
             control codes.  ReportInit() will initially create this
             database with printer drivers for ASCII Text, HP LaserJet+,
             and Epson FX printers.  Since it is a database file you as
             the application programmer may design an interface to allow
             users to add, edit, or delete records.  This can give the end
             user complete printer control.

             Structure of PRINTERS.DBF

             Field Name   Type   Len   Dec  Description                 
             NAME         C       24        Descriptive name for printer
             PGHEIGHT     N        4     1  Printable page height inches
             PGWIDTH      N        4     1  Printable page width in inches
             RESET        C       60        Printer reset initialize code
             SIX_LPI      C       60        Six lines per inch
             EIGHT_LPI    C       60        Eight lines per inch
             PORTRAIT     C       60        Portrait mode on (Laser only)
             LANDSCAPE    C       60        Landscape mode on (Laser only)
             BOLD_ON      C       60        Bold print on
             BOLD_OFF     C       60        Bold print off
             COND_ON      C       60        Condensed mode on
             COND_OFF     C       60        Condensed mode off
             WIDE_ON      C       60        Wide print on
             WIDE_OFF     C       60        Wide print off
             ITAL_ON      C       60        Italics font on
             ITAL_OFF     C       60        Italics font off
             UNDR_ON      C       60        Underline on
             UNDR_OFF     C       60        Underline off
             SUPER_ON     C       60        Superscript on
             SUPER_OFF    C       60        Superscript off
             SUB_ON       C       60        Subscript on
             SUB_OFF      C       60        Subscript off


             REPORTS.DBF - This database contains report definitions.  It
             can be used as a user definable report scheme.


             Structure of REPORTS.DBF


             Field Name   Type   Len   Dec  Description                 
             NAME         C       40        Descriptive name for report
             TITLE        C       40        Definable title for report
             DESCRIP      C      254        Description of report
             PRNAME       C       24        Selected printer driver name
             WIDTH        N        3     0  Report width in columns
             PITCH        C        1        N=Normal, C=Condensed
             ORIENT       C        1        P=Portrait, L=Landscape
             SPACING      N        1     0  6=Six LPI, 8=Eight LPI
             LEFTMARGIN   N        2     0  Left margin (in columns)
             TOPMARGIN    N        2     0  Top margin (in lines)
             BOTMARGIN    N        2     0  Bottom margin (in lines)
             SETUPSTR     C       60     0  Additional setup string

Notes:       Passing a <create> argument value of True is useful to ensure
             that any existing PRINTERS.DBF and REPORTS.DBF have the
             proper database structure.  The default is false.  If create
             is specified and the file already exists, the old data will
             be appended into the newly created files.  If you want the
             files to be empty when created, OPENED() them then ZAP before
             calling REPORTINIT().

             The printer control codes are stored in the PRINTERS database
             in a text form that can be both read and edited.  These codes
             are converted to actual printer control codes (escape
             sequences) using the RLIB PRINTCODE() function.  See the
             documentation for PRINTCODE() for details.

Example:     *-- preparation startup code in order to use StartReport()
             ReportInit()
             .
             .
             .
             IF StartReport()
                *... do report stuff here
             ENDIF

Source:      RL_REPOR.PRG

See also:    PRINTCODE(), STARTREPORT()

See Also: PRINTCODE() STARTREPORT()

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