Does anyone know how to stop the blank line from being added to the top of the text file, when exporting a report to a text file using the Export feature of the File menu?
TIA,
Tom-G
Does anyone know how to stop the blank line from being added to the top of the text file, when exporting a report to a text file using the Export feature of the File menu?
TIA,
Tom-G

This month, every Windows Secrets subscriber can download a one-chapter excerpt of Windows 7: The Missing Manual.Windows 7: The Missing Manual provides valuable information to help you overcome these difficulties in learning a new operating system. Subscribe today to download your free excerpt.
This question has been asked many times in the newsgroups, without a clear solution. Post-processing the text file seems to be the only workaround...
How about making the report run, without having to sit there and click the Last Page button in preview? Is the only way to use a combination of NextRecord and PrintSection???
-TIA
Not quite sure what you mean, but does the thread starting at <post#=352265>post 352265</post#> help? Look for the replies by <!profile=Francois>Francois<!/profile> and <!profile=MarkD>MarkD<!/profile>.
Here's what I mean.
If you print preview a report, and use code to save the reports contents to a text file (in this case hand coded XML around my fields) the on close event works nicely in saving the file. However, if you don't move to the last page, the report only has the data that was included from the beginning up to the page previewed. I don't want human intervention, I have to some how make the report go through all the records.
The post on 352265 doesn't help, as we have a policy of not using SendKeys for any reason. Too many things can happen with those, and I've seen SendKeys respond to unexpected dialog boxes, etc.
What I do is make a string variable out of my reports detail and group sections, and I set MoveLayout=False, NextRecord=True, and PrintSection=True. It works very well, as I don't care to print the report to paper, I just need it to run through all the records.
I was wondering if this is the only way,
Tom
Export the report from the database window instead of from print preview. All pages will be exported automatically. (If the user has already opened the report in print preview, close it in code)
Thanks, but that's when the unwanted blank line appears at the top of the page, and the Application reading the XML file exported from the report is expecting <?xml version='1.0' encoding='iso-8859-1'?> on the very first line.
-Tom
No other ideas then. Sorry.
Nothing to be sorry for, I just wanted to know if this method made sense. It works very well, but I always look for better ways, code, etc.