Since there have been a few items about exporting data into text files,
I thought I would put in request for an enhancement for exporting data to text files. While Alpha 5 does the ability to export to text files, I believe it could be improved. The current export method uses a given
table and exports the data verbatim. That is good, but it has 3 serious and important limitations. One is that it does not allow for calculated fields or constant fields. It does not allow for sizing, formatting and positioning of the data. Finally it does not allow for totaling or grouping of any kind.
We do a lot of data export via text files to allow for the transfer of information into other programs. The text files that are created must be in specific format in order for the other software packages or files sent to outside vendors to be able to use them.
For example we create a simple text file for import into our payroll program which follows this format...
5,MICH,14.00,7.50,1
The 5 is a constant, as is the trailing 1. The 3rd and 4th fields are numeric and are required to be left formatted.
Another example is file we have to create to modem off to a bank for pension processing and it follows this format...
RCI123456789lastname|firstname 123 anywhere street...
The line is actually 433 characters long and the last line of the file must be totals, etc. In this example, RCI is a constant, the next number is the social security number without the dashes, next is the last name and first name separated with the |, then the address beginning at column 48, the balance of the file has certain data beginning at specific columns.
Another example might be a file for payroll Direct Deposit, which is similar to the above example, but it also requires a header line and any numeric fields may not have a decimal point. $27.00 must be output as 2700.
In Alpha 4 we can create a report, place all the fields where they need to be, format their output, add grouping etc as necessary and then simply print the report to a file using a printer configuration with no formatting codes.
It is true that the writeln command can be used in Alpha 5 to create the above mentioned output, but is very difficult to do, especially when long lines have to be created and to deal with total lines and formatting. It is also slow to execute. What we have done to make the export easier is to create a table that is in exact format of the desired export text file, append records to it, calculate the totals and append that totals record, use a global update to add the constant fields and then export the file. It works, but it rather clumsy.
What do you think?
mike
I thought I would put in request for an enhancement for exporting data to text files. While Alpha 5 does the ability to export to text files, I believe it could be improved. The current export method uses a given
table and exports the data verbatim. That is good, but it has 3 serious and important limitations. One is that it does not allow for calculated fields or constant fields. It does not allow for sizing, formatting and positioning of the data. Finally it does not allow for totaling or grouping of any kind.
We do a lot of data export via text files to allow for the transfer of information into other programs. The text files that are created must be in specific format in order for the other software packages or files sent to outside vendors to be able to use them.
For example we create a simple text file for import into our payroll program which follows this format...
5,MICH,14.00,7.50,1
The 5 is a constant, as is the trailing 1. The 3rd and 4th fields are numeric and are required to be left formatted.
Another example is file we have to create to modem off to a bank for pension processing and it follows this format...
RCI123456789lastname|firstname 123 anywhere street...
The line is actually 433 characters long and the last line of the file must be totals, etc. In this example, RCI is a constant, the next number is the social security number without the dashes, next is the last name and first name separated with the |, then the address beginning at column 48, the balance of the file has certain data beginning at specific columns.
Another example might be a file for payroll Direct Deposit, which is similar to the above example, but it also requires a header line and any numeric fields may not have a decimal point. $27.00 must be output as 2700.
In Alpha 4 we can create a report, place all the fields where they need to be, format their output, add grouping etc as necessary and then simply print the report to a file using a printer configuration with no formatting codes.
It is true that the writeln command can be used in Alpha 5 to create the above mentioned output, but is very difficult to do, especially when long lines have to be created and to deal with total lines and formatting. It is also slow to execute. What we have done to make the export easier is to create a table that is in exact format of the desired export text file, append records to it, calculate the totals and append that totals record, use a global update to add the constant fields and then export the file. It works, but it rather clumsy.
What do you think?
mike