I have run into a project where it is necessary for me to include column headers on a text file export from VFP. Is this possible and are there any limitations?
D'oh! This is always something which used to come up when people required headers for export from my old direct marketing days!
As of yet the best way (I have found) is to export to your text file, then open it using low level fopen() and literally iterate through each field in your table using the AFIELDS(array,alias) command and create a text string from it. Separate your field names with whatever delimiter you like and insert the row into your text file using Fputs()
There should be a parameter for it on the copy to clause don't you think?
1. Create a report form as you would want it to print.. with header etc,
2. To direct the report to a text file..
REPORT FORM myReportForm TO FILE "myTextFile.txt" ASCII
Hope this helps you ramani :-9
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
This will export the file to text. It won't export memo fields though, just "memo" or "Memo" depending on whether or not the memo field has data in it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.