Results 1 to 9 of 9
  1. #1
    New Lounger
    Join Date
    Mar 2004
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Report Export to Text File (Any Version)

    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

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Report Export to Text File (Any Version)

    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...

  3. #3
    New Lounger
    Join Date
    Mar 2004
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Report Export to Text File (Any Version)

    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

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Report Export to Text File (Any Version)

    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>.

  5. #5
    New Lounger
    Join Date
    Mar 2004
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Report Export to Text File (Any Version)

    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

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Report Export to Text File (Any Version)

    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)

  7. #7
    New Lounger
    Join Date
    Mar 2004
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Report Export to Text File (Any Version)

    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

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Report Export to Text File (Any Version)

    No other ideas then. Sorry.

  9. #9
    New Lounger
    Join Date
    Mar 2004
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Report Export to Text File (Any Version)

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •