home *** CD-ROM | disk | FTP | other *** search
/ Shareware 1 2 the Maxx / sw_1.zip / sw_1 / TEXT / PDX_ALL.ZIP / TI500.ASC < prev    next >
Text File  |  1991-09-11  |  3KB  |  133 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT  :  PARADOX                                NUMBER  :  500
  9.   VERSION  :  3.xx
  10.        OS  :  PC DOS
  11.      DATE  :  September 11, 1991                       PAGE  :  1/2
  12.  
  13.     TITLE  :  CREATING A REPORT WITH A ONE-TO-MANY RELATIONSHIP
  14.  
  15.  
  16.  
  17.  
  18.   NOTE:  THE INFORMATION ON THIS SHEET ASSUMES THE USER HAS A
  19.          THOROUGH UNDERSTANDING OF PARADOX QUERY AND REPORT
  20.          GENERATION.
  21.  
  22.   In this example, the following tables will be used:
  23.  
  24.   ┌───────────────────┐ ┌───────────────────┐ ┌───────────────────┐
  25.   │    "CUSTOMER"     │ │     "ORDERS"      │ │     "QUOTES"      │
  26.   │    ──────────     │ │     ────────      │ │     ────────      │
  27.   │  Cust#       N*   │ │  Cust#       N*   │ │  Cust#      N*    │
  28.   │  Name        A35  │ │  Order#      N*   │ │  Quote#     N*    │
  29.   │  Address     A35  │ │  Item        A20  │ │  Item       A20   │
  30.   │  City        A25  │ │  Price       $    │ │  Price      $     │
  31.   │  State       A2   │ │  Quantity    N    │ │  Quantity   N     │
  32.   │  Zip         A10  │ │                   │ │  Status     A1    │
  33.   └───────────────────┘ └───────────────────┘ └───────────────────┘
  34.  
  35.   Using the above tables, we assume that each customer may have
  36.   many orders and many quotations.  By manipulating these tables,
  37.   we will be able to generate a report listing the customers with
  38.   their quotations and orders grouped together.  Follow these
  39.   steps:
  40.  
  41.   1.   <C>reate a new table called "CUSTRPT".  Borrow the structure
  42.        from "ORDERS" and "QUOTES".  Key the first "Cust#" field and
  43.        delete the extra "Cust#" field on row 6.  You will also need
  44.        to delete one of the "Item", "Price", and "Quantity" fields
  45.        from the structure.  Then, select <D>oIt!
  46.  
  47.   2.   <A>sk the "CUSTRPT" table, type INSERT in the leftmost
  48.        column.  Then, below each field with a corresponding field
  49.        in the "ORDERS" table, type in a unique example element
  50.        using the <F5> key.
  51.  
  52.   3.   Move down to the second row of "CUSTRPT" query by pressing
  53.        the down-arrow key.  Then, type INSERT in the leftmost
  54.        column again.  Below each field with a corresponding field
  55.        to the "QUOTES" table, type in a unique example element
  56.        using the <F5> key.
  57.  
  58.   4.   <A>sk the "ORDERS" table.  Then, in each field, type the
  59.        example element from the corresponding field from the first
  60.        row of the "CUSTRPT" query.
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.   PRODUCT  :  PARADOX                                NUMBER  :  500
  75.   VERSION  :  3.xx
  76.        OS  :  PC DOS
  77.      DATE  :  September 11, 1991                       PAGE  :  2/2
  78.  
  79.     TITLE  :  CREATING A REPORT WITH A ONE-TO-MANY RELATIONSHIP
  80.  
  81.  
  82.  
  83.  
  84.   5.   <A>sk the "QUOTES" table.  Then, in each field, type the
  85.        example element from the corresponding field from the second
  86.        row of the "CUSTRPT" query.
  87.  
  88.   6.   Press the <F2> key.
  89.  
  90.   7.   Now, create a Free-form report on the "CUSTRPT" table.  In
  91.        the report, place a group on "Cust#".  Then, do a lookup to
  92.        the "CUSTOMER" table linking by the "Cust#" field.  Place
  93.        all the fields from the "CUSTOMER" table in the "Cust#"
  94.        group header.  Then, place all the "CUSTRPT" detail fields
  95.        in the form band.  Turn on line squeeze by selecting
  96.        <S>ettings <R>emoveblanks <L>inesqueeze.
  97.  
  98.   8.   You are now ready to output your report.
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.