home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / reflexex.zip / ROTATE.DOC < prev   
Text File  |  1986-06-22  |  7KB  |  160 lines

  1. .HE         INSTRUCTIONS FOR ROTATING A SPREAD SHEET TO USE WITH REFLEX
  2.  
  3.                              ROTATING A WORKSHEET
  4.  
  5.  
  6. This   paper   gives   instructions  for  rotating  a   file   in 
  7. 'spreadsheet'  format  to a 'database' format.   The  spreadsheet 
  8. used in this example looks like:
  9.  
  10.  
  11.            A      B      C      D      E      F      G      H
  12.      1  
  13.      2
  14.      3
  15.      4
  16.      5                   1980   1981  1982   1983   1984   1985
  17.      6                  =========================================      
  18.      7  Sales             123    55    81    109    130     41         
  19.      8    Discounts        12    13    14     54     35     56
  20.      9  Net Sales         111    42    67     55     95    -15 
  21.      10 COGS               49    22    33     44     52     16
  22.      11 Gross Margin       62    20    35     11     43    -32
  23.      12 Admin. Expense     14    10    13     24      4      4
  24.      13 Selling Expense    13     1     2     12     18      4  
  25.      14 Profit             35     9    19    -24     20    -40
  26.      15
  27.      16
  28.  
  29.  
  30. 1.  Run  Translate.  The translate specification should have  the 
  31.     following parameters:
  32.  
  33.     Translate: From Col A  Row 7   To Col H  Row 14
  34.     Show Data from Row  7
  35.  
  36.     Position  has value of  Type  Reflex Field Name Type Include?
  37.  
  38.      A7       Sales         Text   Line_Item        Text  Yes
  39.      B7                     Text   Field2           Text  No         
  40.      C7       123           Num    Year 1980        Num   Yes 
  41.      D7        55           Num    Year 1981        Num   Yes
  42.      E7        81           Num    Year 1982        Num   Yes
  43.      F7       109           Num    Year 1983        Num   Yes
  44.      G7       130           Num    Year 1984        Num   Yes
  45.      H7        41           Num    Year 1985        Num   Yes    
  46.  
  47. 3.   Notice   that   Column   A   has   a   Reflex   field   name 
  48.      "Line_Item".   This should be typed in directly.   Column  B 
  49.      has  a field name "Field2." Reflex assigned this field  name 
  50.      automatically.   You  don`t have to change this because  the 
  51.      column is not included in your database anyway.
  52. .PAè4.   The  rest  of  the  Columns  in  the  worksheet  have   been
  53.      assigned  field  names  that correspond to  the  appropriate     
  54.      years.   You will notice that instead of a Reflex field name      
  55.      "1980",  "Year 1980" is used.   That is because Reflex won't      
  56.      allow field names that are entirely numbers.
  57.      
  58. 5.   Set  the  "Type"  of the "Year  1980"  through  "Year  1985"            
  59.      columns to Numeric.
  60.  
  61. 6.   Translate  the file.  Skip to step 7 unless you want to view 
  62.      the  translated file in Reflex.    Quit from  the  Translate 
  63.      tool  and  Exit  to  DOS.   Load  Reflex  and  retrieve  the 
  64.      translated  file.   No views will display.   Press / V L  to 
  65.      open the List  View. The List View will look like this:
  66.  
  67.                  Year 1980  Year 1981  Year 1982  Year 1983 
  68.      Sales             123         55         81        109           
  69.         Discount        12         13         14         54 
  70.      Net Sales         111         42         67         55  
  71.      COGS               49         22         33         44  
  72.      Gross Margin       62         20         35         11  
  73.      Admin. Expense     14         10         13         24  
  74.      Selling Expense    13          1          2         12    
  75.      Profit             35          9         19        -24     
  76.  
  77.  
  78.      This is a Reflex version of the worksheet database.  We must 
  79.      now convert this data to a normalized format, separating the data 
  80.      into separate records.
  81.  
  82. 7.   Run  Report, retrieve the translated  file,  then  design  the 
  83.      following Report:
  84.  
  85.      REPORT DESIGN
  86.  
  87.      "Line_Item",      "Year_1980",     1980
  88.      "Line_Item",      "Year_1981",     1981
  89.      "Line_Item",      "Year_1982",     1982
  90.      "Line_Item",      "Year_1983",     1983 
  91.      "Line_Item",      "Year_1984",     1984
  92.      "Line_Item",      "Year_1985",     1985
  93.  
  94.  
  95.      Notice   how   "Line_Item"  is  repeated  for   each   year. 
  96.      "Line_Item" and "Year 198x" fields have been surrounded with 
  97.      double quotes and followed by a comma.   These were set with 
  98.      the  Export Attribute in the Report View.   The single words 
  99.      1980  through  1985 do not have to be surrounded  with  such 
  100.      delimiters,  because  they are single words and will  always 
  101.      have value.
  102.  
  103.      Use  the Variable Width Attribute to set the width of  every 
  104.      field "Wide As Needed" to allow all entries to be      
  105.      completely exported.
  106. .PAè8.   Open  the  Change  Printer  Settings.   Set  the   following                         
  107.      parameters:
  108.          
  109.           Output to Disk File
  110.           Enter a file name
  111.           Top Margin = 0
  112.           Bottom Margin = 0
  113.           Left Margin = 0
  114.           Right Margin = 254
  115.           Print with Page Breaks = NO (very   important   when 
  116.           exporting data to disk).    
  117.  
  118. 9.   Preview the Report.  The following should display:
  119.  
  120.           "Sales",       "123",  1980
  121.           "Sales",       "55",  1981
  122.           "Sales",       "81",  1982
  123.           "Sales",       "109",  1983
  124.           "Sales",       "130",  1984
  125.           "Sales",       "41",  1985
  126.           "  Discounts", "12",  1980
  127.           "  Discounts", "13",  1981
  128.           "  Discounts", "14",  1982
  129.           "  Discounts", "54",  1983
  130.           "  Discounts", "35",  1984
  131.           "  Discounts", "56",  1985
  132.           "Net Sales",   "111",  1980    etc...
  133.  
  134. 10.  Print  the  report.   The report will create an ASCII  text 
  135.      file.  
  136.  
  137. 11.  Run Translate.   Create a Translate Spec with the  following      
  138.      parameters:
  139.  
  140.      File Type  Text  
  141.  
  142.      Reflex Field  Reflex Type  Go From  Stop On     Include?
  143.  
  144.      Line_Item     Text         Any Char End of Word  Yes
  145.      Amount        Numeric      Any Char End of Word  Yes
  146.      Year          Text         Any Char End of Word  Yes
  147.     
  148.      Select Translate.
  149.  
  150. 13.  Retrieve  the translated database.  Because the database was 
  151.      just  translated,  a View will not open.   You will have  to 
  152.      open  one  of  the  Views.  After you  save  the  translated 
  153.      database with a View displayed, a View will always open when 
  154.      the file is retrieved. 
  155.  
  156.      The  worksheet data has been translated into  Reflex  format 
  157.      and rotated into normalized database format.   You should be      
  158.      ready to analyze your data.
  159.  
  160.                               <<<  The End  >>>