January 10, 200124 yr Hi Guys, I'm trying to write information to a single ACSII file. I would like the very first record to contain descriptive information about the file. i.e. external filename, number of detail records, totals, and possibly a transaction date. The detail records containing information found within a specific subset from the database. Is this possible? Thanks
January 13, 200124 yr I'm not aware of any direct way of doing this, but you can do it with a calculated field and a dummy header record. The header record is just another record but is sorted to the top of the set. To make sure that this record is the first to export, create a field called 'Header'. Put some value in that field in the header record, and leave it blank in all others. Put Header at the top of your sort order and set it to sort in descending order. Then you create a calculated field to export. Eg, if you have the following fields that you want to export: text1 text2 text3 numbr1 numbr2 numbr3 and your header information is in a global field called 'gHeaderInfo' then your calculated field 'Export' would be: Export = Case(not(IsEmpty(Header)),gHeaderInfo, 1, text1 & "," & text2 & "," & text3 & "," & NumToText(numbr1) & "," & NumToText(numbr2) & "," & NumToText(numbr3), Kind of messy huh? [This message has been edited by BobWeaver (edited January 12, 2001).]
Create an account or sign in to comment