Results 1 to 4 of 4
  1. #1
    thekruser is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    93

    Eliminate line breaks in exported report

    I have a database which I am building to output html code to a .txt file for uploading to a site. The problem I face is, I cannot figure out how to force a line of text to export as continuous. As it sits, longer lines of code are forced a line break (carriage return) upon export.



    Please see attached. Where am I going wrong?

    Thank you for your time and help. Have a great day!

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    I did not look at your sample, but are you exporting the report to HTML by right clicking? by vba code? what do you want as an output? just the data? is the report based on a query? if it is, have you considered using ADO stream objects, or maybe even the I/O methods from DAO to stream the data right into a created text file?

    That method would of course require you to intersperse the lines of data with relevant HTML tags, but a one-time setup function might be worth the time if the process is going to repeated more than once...

  3. #3
    thekruser is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Aug 2010
    Posts
    93
    @ajetrumpet
    Hahaha...I have no idea what you said, but I will look into it!

    As for the output, I have many text fields which I have put into queries like:

    Code:
    LargeImage: '<td><a href="' & [tblLinkData.LinkAddress] & [tblBadges.LargeImage] & '" target="_blank" title="' & [tblBadges.BadgeName] & '">' & [tblBadges.BadgeName] & '</a>'
    I created a report that calls this query and the resulting data looks like:

    Code:
    <a href="/aaaaa/bbbbb/image.png" target="_blank" title="Badge Name">Badge Name</a>
    The problem lies in the fact that when I right click the report and export as txt, the report properties (I assume) causes the results to look like:

    Code:
    <a href="/aaaaa/bbbbb/image.png" target="
    _blank" title="Badge Name">Badge Name</a>
    for longer lines of code. This line break causes undesirable results, as you can imagine. The goal is to update 5 different pages with info contained in the db whenever there is an update. For now, the plan is to simply export to a .txt and copy/paste into my CMS. I just have to figure out how to stop it from inserting that line break.

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    as in my previous post, if your report data comes strictly from the report, you can export the query instead. forget the report. I wonder if that would made any difference?

    What I meant by streaming is using the ADO or ADOX libraries in access to stream data from one source to another. The process is virtually limitless because text data is compatible with almost anything, if not anything.

    Apparently you are using 07, so go to your vba references and put some check boxes next to "microsoft access data objects" (or just 'access data objects'...can't remember right now). I'm not sure why, but my databases have versions 2.5 all the way to version 6.0. Don't ask me why, I just check them all to make sure I've got it covered!

    the help articles can guide you on how to stream in and out, as both methods are available. things like:

    • readtext
    • read
    • loadfromfile
    • writetext


    These are all very useful. Some of them are specific to ADO, so they are not in DAO, but DAO has it's own methods which are just as useful, if not more. The reason I love using streams is because they seem so 'unrisky', sort of like liquidity in business. I've never had a problem doing it, and it's usually very fast even for large amounts of data to be written or read.

    I only have a couple of ADO functions currently listed on my samples page, but I will continually add more if they are useful. Take a look at the 'Txt' functions on this page: http://www.ajenterprisesonline.com/ab/_functions/

    I think all of those use FileSystemObject or I/O methods. I know there are no ADO streams there yet, but I'm sure I'll post some in the future...

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Eliminate dead code
    By thekruser in forum Programming
    Replies: 7
    Last Post: 09-15-2010, 09:52 AM
  2. Eliminate redundant data from Pick Box?
    By jsbdiver in forum Forms
    Replies: 5
    Last Post: 06-14-2010, 04:04 PM
  3. Exporting and Updating exported data
    By Singapore Sam in forum Import/Export Data
    Replies: 2
    Last Post: 12-15-2009, 09:33 AM
  4. Replies: 0
    Last Post: 11-23-2009, 09:19 PM
  5. Replies: 3
    Last Post: 03-24-2006, 08:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums