home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / database / p4w_all.zip / TI1253.ASC < prev    next >
Text File  |  1993-02-05  |  11KB  |  397 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT  :  Paradox for Windows                   NUMBER  :  1253
  9.   VERSION  :  1.0
  10.        OS  :  WIN
  11.      DATE  :  February 5, 1993                         PAGE  :  1/6
  12.  
  13.     TITLE  :  INFORECORDS: A powerful way to print forms & reports
  14.  
  15.  
  16.  
  17.  
  18.   Intended Audience:
  19.   This Technical Information Sheet is for the more experienced
  20.   ObjectPAL programmer who wants more power in printing reports and
  21.   forms.
  22.  
  23.   Prerequisites:
  24.   The user should have a good overview of printing reports and
  25.   forms with ObjectPAL using more conventional commands.
  26.  
  27.   Purpose:
  28.   To enable you to have more control over printing in your
  29.   application.
  30.  
  31.                      Print and Open InfoRecords
  32.  
  33.   For the ObjectPAL programmer, the infoRecord approach to opening
  34.   and printing forms and reports is the most powerful and flexible
  35.   of all.  All of the options available to the interactive report
  36.   designer become available to your application through the
  37.   infoRecords.
  38.  
  39.   One possible use for the printInfoRecord occurs when you have a
  40.   report designed as landscape, but need to print the report on
  41.   paper in a portrait orientation.  The panelOptions can be
  42.   provided in the info record to indicate your desire to clip the
  43.   overflow, or to print additional pages to 'panel' the entire
  44.   report across multiple pieces of paper.
  45.  
  46.   There are two general steps to follow when using the infoRecords:
  47.  
  48.      1.  Define the record:
  49.  
  50.          var
  51.             rep report
  52.             myInfo reportPrintInfo
  53.          endvar
  54.  
  55.          myInfo.name = "oldsocks.rsl"       ; Use your own report
  56.                                             ;   files here
  57.  
  58.          myInfo.masterTable="damaged.qbe"   ; A different table
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.   PRODUCT  :  Paradox for Windows                   NUMBER  :  1253
  75.   VERSION  :  1.0
  76.        OS  :  WIN
  77.      DATE  :  February 5, 1993                         PAGE  :  2/6
  78.  
  79.     TITLE  :  INFORECORDS: A powerful way to print forms & reports
  80.  
  81.  
  82.  
  83.  
  84.      2.  Issue the print() statement using the infoRecord as the
  85.          only argument
  86.  
  87.          rep.print(myInfo)
  88.  
  89.   That's all there is to it!  Read through the descriptions of
  90.   infoRecords below to see how many options are available to you
  91.   when printing/displaying your forms and reports.  Be sure to read
  92.   the noted sections of the ObjectPAL documentation as well.
  93.  
  94.   Here are the three record types, and their fields:
  95.  
  96.   ReportOpenInfo
  97.  
  98.                   Data
  99.   Field           Type       Description
  100.  
  101.   x               LongInt    x-coordinate of upper-left corner of
  102.                              the report when opened, in twips
  103.  
  104.   y               LongInt    y-coordinate of upper-left corner of
  105.                              the report when opened, in twips
  106.  
  107.   w               LongInt    Width of the report, in twips
  108.  
  109.   h               LongInt    Height of the report, in twips
  110.  
  111.   name            String     Name of the report to open. May
  112.                              include alias, or any needed path
  113.                              information.
  114.  
  115.   masterTable     String     Use this table in place of any
  116.                              existing master table in the dataModel
  117.                              of the report being opened. Will add a
  118.                              table to a table-less report. Attempts
  119.                              to link to detail tables as arranged
  120.                              by existing table. A QBE file is a
  121.                              valid table here.
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.   PRODUCT  :  Paradox for Windows                   NUMBER  :  1253
  141.   VERSION  :  1.0
  142.        OS  :  WIN
  143.      DATE  :  February 5, 1993                         PAGE  :  3/6
  144.  
  145.     TITLE  :  INFORECORDS: A powerful way to print forms & reports
  146.  
  147.  
  148.  
  149.  
  150.                   Data
  151.   Field           Type       Description
  152.  
  153.   queryString     String     Query to run (like executeQBEString),
  154.                              who's Answer table will become master
  155.                              to report. Overrides any entry in
  156.                              masterTable.
  157.  
  158.   refreshOptions  SmallInt   One of 4 reportRestartOption
  159.                              constants: PrintFromCopy; PrintLock;
  160.                              PrintRestart; PrintReturn
  161.  
  162.  
  163.   FormOpenInfo               (works with openAsDialog also)
  164.  
  165.   x               LongInt    x-coordinate of upper-left corner of
  166.                              the form when opened, in twips
  167.  
  168.   y               LongInt    y-coordinate of upper-left corner of
  169.                              the form when opened, in twips
  170.  
  171.   w               LongInt    Width of the form, in twips
  172.  
  173.   h               LongInt    Height of the form, in twips
  174.  
  175.   name            String     The name of the form to open. May
  176.                              include alias, or any needed path
  177.                              information.
  178.  
  179.   masterTable     String     Uses this table in place of any
  180.                              existing master table in the dataModel
  181.                              of the form being opened. Will add a
  182.                              table to a table-less form. Attempts
  183.                              to link to detail tables as arranged
  184.                              by existing table. A QBE file is a
  185.                              valid table here.
  186.  
  187.   queryString     String     A query to run, like executeQBEString,
  188.                              who's Answer table will become the
  189.                              master to the form. Overrides any
  190.                              entry in masterTable.
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.   PRODUCT  :  Paradox for Windows                   NUMBER  :  1253
  207.   VERSION  :  1.0
  208.        OS  :  WIN
  209.      DATE  :  February 5, 1993                         PAGE  :  4/6
  210.  
  211.     TITLE  :  INFORECORDS: A powerful way to print forms & reports
  212.  
  213.  
  214.  
  215.  
  216.   style           LongInt    Any valid combination of Windows Style
  217.                              Constants (e.g. WinstyleVScroll,
  218.                              WinStyleMinimize etc.). See page 200
  219.                              in the ObjectPAL Developer's Guide for
  220.                              a list of valid constants.
  221.  
  222.   refreshOptions  SmallInt   One of 4 reportRestartOption
  223.                              constants: PrintFromCopy; PrintLock;
  224.                              PrintRestart; PrintReturn. This
  225.                              affects any queries involved in the
  226.                              form open (master table is QBE, query
  227.                              in queryString).
  228.  
  229.   ReportPrintInfo
  230.  
  231.   name            String     Name of the report to print. May
  232.                              include alias, or any needed path
  233.                              information.
  234.  
  235.   masterTable     String     Use this table in place of any
  236.                              existing master table in the dataModel
  237.                              of the report being printed. Will add
  238.                              a table to a table-less report.
  239.                              Attempts to link to detail tables as
  240.                              arranged by existing table. A QBE file
  241.                              is a valid table here.
  242.  
  243.   queryString     String     Query to run (like executeQBEString),
  244.                              who's answer table will become master
  245.                              to report. Overrides any entry in
  246.                              masterTable.
  247.  
  248.   refreshOptions  SmallInt   One of 4 reportRestartOption
  249.                              constants: PrintFromCopy; PrintLock;
  250.                              PrintRestart; PrintReturn
  251.  
  252.   printBackwards  Logical    Default = FALSE. Use this when your
  253.                              printer won't collate for you
  254.  
  255.   makeCopies      Logical    Will Paradox or the Printer make the
  256.                              copies if nCopies <> 1. TRUE = Paradox
  257.                              generates copies
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.   PRODUCT  :  Paradox for Windows                   NUMBER  :  1253
  273.   VERSION  :  1.0
  274.        OS  :  WIN
  275.      DATE  :  February 5, 1993                         PAGE  :  5/6
  276.  
  277.     TITLE  :  INFORECORDS: A powerful way to print forms & reports
  278.  
  279.  
  280.  
  281.  
  282.   panelOptions    SmallInt   One of 4 ReportPrintPanel constants:
  283.                              PrintHorizontalPanel;
  284.                              PrintClipToWidth; PrintOverflowPages;
  285.                              PrintVerticalPanel. Here you decide
  286.                              how Paradox should deal with a report
  287.                              larger than the physical page.
  288.  
  289.   nCopies         SmallInt   Number of copies to print. See
  290.                              "makeCopies"
  291.  
  292.   startPage       LongInt    Default = 1. What page to begin
  293.                              printing on.
  294.  
  295.   endPage         LongInt    Default = lastpage. Where to stop
  296.                              printing
  297.  
  298.   pageIncrement   SmallInt   Default = 1. Page increment for
  299.                              multi-pass printing. THIS MAY AFFECT
  300.                              CALC FIELD RESULTS.
  301.  
  302.   xOffset         LongInt    Slide printed image this many twips to
  303.                              the right on the page
  304.  
  305.   yOffset         LongInt    Slide printed image this many twips
  306.                              down on the page
  307.  
  308.   orient          SmallInt   One of three ReportOrientation
  309.                              constants: PrintLandscape;
  310.                              PrintPortrait;
  311.                              PrintDefaultOrientation. The latter
  312.                              prints in the current orientation of
  313.                              the printer.
  314.  
  315.  
  316.   Notes:
  317.  
  318.     Simple examples are found on the following pages:
  319.  
  320.     Forms - ObjectPAL Reference, page 212;
  321.     Reports - ObjectPAL Reference, page 365;
  322.     ObjectPAL Developer's Guide, page 202.
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.   PRODUCT  :  Paradox for Windows                   NUMBER  :  1253
  339.   VERSION  :  1.0
  340.        OS  :  WIN
  341.      DATE  :  February 5, 1993                         PAGE  :  6/6
  342.  
  343.     TITLE  :  INFORECORDS: A powerful way to print forms & reports
  344.  
  345.  
  346.  
  347.  
  348.     The parameters below are only ignored or defaulted if they are
  349.     unassigned -- that is, once you assign a value to a part of the
  350.     record, it will keep that value for the life of the object
  351.     containing the record. Additionally, you may unassign the field
  352.     using a statement like:
  353.  
  354.     myInfo.masterTable.unAssign()
  355.  
  356.  
  357.   DISCLAIMER: You have the right to use this technical information
  358.   subject to the terms of the No-Nonsense License Statement that
  359.   you received with the Borland product to which this information
  360.   pertains.
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.