To create a CSV file from the LID Print Manager
- In the Infor Lawson Interface Desktop Print Manager, select the print file that you want to create a CSV file from.
- From the Actions menu, select Send to Screen.
-
Position the cursor on a representative line for the
kind of data you want to extract to a CSV file.
You may need to experiment with where you position the cursor and with the CSV Output File Attribute Definition parameters in order to create a CSV file with the contents you want. For example, if you position the cursor on a line that represents the header data, you will generally get less data. If you position the cursor on a line that represents a subordinate-level group on a page, you will get more data--the data for the subordinate--level group and all higher level groups from the page. CSV Extraction Process
- Press Send (F8), and select CSV File.
-
Select one of these choices:
All Data in Report Group Save all the data field values from all occurrences throughout the file of the lines (one or more) contained in the report group in which you have placed the cursor. Cursor Line Data Only Save only the data fields from all occurrences throughout the file of only the data line on which you have placed the cursor. After you make your selection, the CSV Output File Attribute Definition form appears.
-
Consider the following fields.
- External Name
-
The external file name of this CSV file. The default is reportname .csv in the directory where the .prt file resides.
- File Header
-
Off (no file header) or On (file header) to specify whether a file header containing field names should be written to the CSV file.
- Xlt Header Names
-
Off or On to specify whether to translate header names. When writing a CSV file, if On, translates the header names as specified in your Locale record.
- Field Separator
-
The symbol separating fields in the file. Valid entries are comma (,), tab, space, and none (fixed-length).
If you select none, the CSV extraction writes fields like a database record; that is, with signed decimal fields and no date formatting. If you do not specify a quote character, header names are fixed 23-character fields.
If you select Custom Char, enter the desired character in the Custom FldSep Char field.
- Custom FldSep Char
-
The symbol separating fields in the file.
- Date Format
-
The date format to use in any date fields that might be included in the file. Valid entries are:
ccyymmdd: Date in century, year, month, day order
mmddccyy: Date in month, day, century, year order
ddmmccyy: Date in day, month, century, year order
yymmdd: Date in year, month, day order
mmddyy: Date in month, day, year order
ddmmyy: Date in day, month, year order
- Date Separator
-
The symbol separating month, day, and year in date formats.
- Time Separator
-
The symbol separating hours and minutes in any time formats that might be included in the file.
- Decimal Separator
-
The symbol separating the parts of a number that has decimal places.
- Thousands Sep
-
The symbol separating the thousands place from the hundreds, and so on.
- Quote Character
-
The symbol to use for delimiting strings.
- Line Terminator
-
The code that denotes the end of each line in the file. Valid entries are cr, nl, and hex 0D0A.
- File Terminator
-
The code that denotes the end of the file. Valid entries are None and hex 1A.
- Extract Report Values from Upper Groups
-
Key Fields Only, All Fields, or none, indicating how (or if) values in report groups higher than the group represented by the data at the cursor position are to be extracted.
- Extract Only n Previous Upper Groups
-
A number indicating how many report groups above the group represented by the data at the cursor position are to be extracted.
A blank or zero denotes all higher report groups.
- File Header Formatting
-
Remove File Prefixes or Show File Prefixes, indicating whether or not to include prefixes from report field names in the CSV file header. If you choose to remove the prefixes, the CSV extraction removes three characters and a hyphen at the beginning of the 4GL name. For example, API-COMPANY becomes COMPANY.
- Names Have Embedded Spaces/Squeeze Names -- No Spaces
-
Toggle between the two selections to specify whether to insert spaces where hyphens were found in names appearing in the file header.
- Extraction Method
-
You can select between the old and new extraction methods. The new extraction method is the one used if you create a CSV through Lawson Portal.
Both extraction methods (the "old" and the "new" method) include the report groups that are found between the top of the page and the first occurrence of the selected group. The old method writes a line to the CSV file only when the selected group is encountered in the report. Lawson Portal method will write a line whenever a second occurrence of the report group is encountered.
- Press OK (Enter) twice. The CSV extraction process extracts the data you specified from the print file, with key fields appearing left to right from highest order keys to lowest order keys. To see the results, display reportname.csv or the name you entered in the External Name field.