Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2002
    Location
    Bay Area
    Posts
    511

    Unanswered: Truncated when Exporting Report to Text File

    I have a 1-page Access report with 6 columns of data. There is adequate white space between the columns when viewing the report and all the text fields show the complete information. When I export the report into a text file, certain strings of text have an entire word truncated off the end of the string. The table length of each text field is 45. In report design, I have used up all the space by widening the fields and the report is now in landscape-legal. The report is used only to get the data to a text file in a format I have chosen so it is "Excel ready". If I export directly to Excel or a CSV (comma delimited) file, there is no truncation. I would like to resolve this problem and be able to export in my chosen format so the data does not have to be rearranged in the final Excel report.

    If I whittle the text down to 33 characters, there is no truncation.

    I am using Access 2003 SP1. Choosing "Window" or "MS DOS" in export options makes no difference. An associate using the same software tested my report and did not experience the truncation.

    Thanks.
    Jerry

  2. #2
    Join Date
    Dec 2004
    Location
    Madison, WI
    Posts
    3,926

    Export

    You can try setting the Can Grow to Yes on the field but if you ultimately want to get the data into excel, why not just use the docmd.transferspreadsheet or the docmd.transfertext command to export the query/table into an excel/excel ready (csv) format (it's a lot cleaner)?

    Also, are there any hard carriage returns in the field? Maybe this could also be giving you a problem.

    And also, do you have boxes or a border around the fields in the report? These can sometimes be a problem if you're trying to go directly from the report to a text file.
    Last edited by pkstormy; 01-11-06 at 22:32.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  3. #3
    Join Date
    Jan 2002
    Location
    Bay Area
    Posts
    511
    The solution I am currently using to avoid text truncation when exporting from Access into a text file is to select the page size of Maximum 11.7 x 17.7 and I expanded the size of the text fields in report designer. I have not accounted for why the 45-character-wide field truncation problem occurs in the first place when the displayed report appears to have adequate space in legal-landscape, nor why I have the problem and an associate with the same Access software does not experience the truncation.

    Setting "can grow" causes text to spill and not what I want in a text file. I am determined to have it my way by positioning all fields of the Access report for use in a specific Excel report. My "Top 5" report is always the same size and format. The reasons for the text field stage is to put the name fields through a text editor macro that changes uppercase data into capitalized words and adds a column delimeter for the Excel import.

    Paul, thank for your time and suggestions.

    Jerry

Posting Permissions

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