home *** CD-ROM | disk | FTP | other *** search
- .HE INSTRUCTIONS FOR ROTATING A SPREAD SHEET TO USE WITH REFLEX
-
- ROTATING A WORKSHEET
-
-
- This paper gives instructions for rotating a file in
- 'spreadsheet' format to a 'database' format. The spreadsheet
- used in this example looks like:
-
-
- A B C D E F G H
- 1
- 2
- 3
- 4
- 5 1980 1981 1982 1983 1984 1985
- 6 =========================================
- 7 Sales 123 55 81 109 130 41
- 8 Discounts 12 13 14 54 35 56
- 9 Net Sales 111 42 67 55 95 -15
- 10 COGS 49 22 33 44 52 16
- 11 Gross Margin 62 20 35 11 43 -32
- 12 Admin. Expense 14 10 13 24 4 4
- 13 Selling Expense 13 1 2 12 18 4
- 14 Profit 35 9 19 -24 20 -40
- 15
- 16
-
-
- 1. Run Translate. The translate specification should have the
- following parameters:
-
- Translate: From Col A Row 7 To Col H Row 14
- Show Data from Row 7
-
- Position has value of Type Reflex Field Name Type Include?
-
- A7 Sales Text Line_Item Text Yes
- B7 Text Field2 Text No
- C7 123 Num Year 1980 Num Yes
- D7 55 Num Year 1981 Num Yes
- E7 81 Num Year 1982 Num Yes
- F7 109 Num Year 1983 Num Yes
- G7 130 Num Year 1984 Num Yes
- H7 41 Num Year 1985 Num Yes
-
- 3. Notice that Column A has a Reflex field name
- "Line_Item". This should be typed in directly. Column B
- has a field name "Field2." Reflex assigned this field name
- automatically. You don`t have to change this because the
- column is not included in your database anyway.
- .PAè4. The rest of the Columns in the worksheet have been
- assigned field names that correspond to the appropriate
- years. You will notice that instead of a Reflex field name
- "1980", "Year 1980" is used. That is because Reflex won't
- allow field names that are entirely numbers.
-
- 5. Set the "Type" of the "Year 1980" through "Year 1985"
- columns to Numeric.
-
- 6. Translate the file. Skip to step 7 unless you want to view
- the translated file in Reflex. Quit from the Translate
- tool and Exit to DOS. Load Reflex and retrieve the
- translated file. No views will display. Press / V L to
- open the List View. The List View will look like this:
-
- Year 1980 Year 1981 Year 1982 Year 1983
- Sales 123 55 81 109
- Discount 12 13 14 54
- Net Sales 111 42 67 55
- COGS 49 22 33 44
- Gross Margin 62 20 35 11
- Admin. Expense 14 10 13 24
- Selling Expense 13 1 2 12
- Profit 35 9 19 -24
-
-
- This is a Reflex version of the worksheet database. We must
- now convert this data to a normalized format, separating the data
- into separate records.
-
- 7. Run Report, retrieve the translated file, then design the
- following Report:
-
- REPORT DESIGN
-
- "Line_Item", "Year_1980", 1980
- "Line_Item", "Year_1981", 1981
- "Line_Item", "Year_1982", 1982
- "Line_Item", "Year_1983", 1983
- "Line_Item", "Year_1984", 1984
- "Line_Item", "Year_1985", 1985
-
-
- Notice how "Line_Item" is repeated for each year.
- "Line_Item" and "Year 198x" fields have been surrounded with
- double quotes and followed by a comma. These were set with
- the Export Attribute in the Report View. The single words
- 1980 through 1985 do not have to be surrounded with such
- delimiters, because they are single words and will always
- have value.
-
- Use the Variable Width Attribute to set the width of every
- field "Wide As Needed" to allow all entries to be
- completely exported.
- .PAè8. Open the Change Printer Settings. Set the following
- parameters:
-
- Output to Disk File
- Enter a file name
- Top Margin = 0
- Bottom Margin = 0
- Left Margin = 0
- Right Margin = 254
- Print with Page Breaks = NO (very important when
- exporting data to disk).
-
- 9. Preview the Report. The following should display:
-
- "Sales", "123", 1980
- "Sales", "55", 1981
- "Sales", "81", 1982
- "Sales", "109", 1983
- "Sales", "130", 1984
- "Sales", "41", 1985
- " Discounts", "12", 1980
- " Discounts", "13", 1981
- " Discounts", "14", 1982
- " Discounts", "54", 1983
- " Discounts", "35", 1984
- " Discounts", "56", 1985
- "Net Sales", "111", 1980 etc...
-
- 10. Print the report. The report will create an ASCII text
- file.
-
- 11. Run Translate. Create a Translate Spec with the following
- parameters:
-
- File Type Text
-
- Reflex Field Reflex Type Go From Stop On Include?
-
- Line_Item Text Any Char End of Word Yes
- Amount Numeric Any Char End of Word Yes
- Year Text Any Char End of Word Yes
-
- Select Translate.
-
- 13. Retrieve the translated database. Because the database was
- just translated, a View will not open. You will have to
- open one of the Views. After you save the translated
- database with a View displayed, a View will always open when
- the file is retrieved.
-
- The worksheet data has been translated into Reflex format
- and rotated into normalized database format. You should be
- ready to analyze your data.
-
- <<< The End >>>