Results 1 to 12 of 12
  1. #1
    Join Date
    Apr 2009
    Posts
    6

    Unanswered: Best way to export data to HTML pages

    Hello Access experts! I've worked with Access frequently in the past (Access 97) and now need to work on a project that I think Access 2007 will be able to tackle (at least I hope so!). I have imported two tables similar to the following:

    Car Info Table
    ---------------------
    Car ID (PK)
    Make
    Model
    Color


    Service Record Table
    ---------------------------
    Service ID (PK)
    Car ID (FK)
    Service Type (Oil change, tune-up, body work, etc.)
    Date


    Each car (record) in the car info table corresponds with multiple service records entries in the service table. What I need to do is format the data for export as HTML where each HTML page contains the car info at the top and the service record details listed below. Any ideas on how I should approach this? I tried creating a test report linked only to the service record table and grouped by the service ID and sorted on service date. However, this is incomplete as I need to include the car details at the top and the export puts info for one car on multiple HTML pages. I need all info and records for a car on the same HTML page. Any suggestions are greatly appreciated.

    Thanks,
    Al

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so that depends on what your web page, what your web page skills are, and what type of scritpign language you are using to create the web page.

    you can use JET as a stroage mechanism to provide data to a webserver based script
    you could even use Access to extract the data and create the web page for you, after all HTML is 'only' text so you coudl create the HTML page there.
    you coudl use a scritping language such as PHP or ASP to create the web page
    you could add on some Web2.0 interactivity using AJAX or similar.
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Apr 2009
    Posts
    6
    Thanks for the reply. I know I can create a page with a technology like PHP and am pretty familiar with that process. Unfortunately, for this project I will need to export static HTML pages as they will be crawled by an in-house search indexer. I'm looking for a way to format the data and export it using only MS Access (if possible).

    --Al

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    so its creating static pages using access
    write to a file the data your need
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Apr 2009
    Posts
    6
    Thanks for the response. I built a query that makes an inner join on the car ID and then created a report to group on the car id and sort by the service date. This gives me more or less what I need in the report except the service type field is long for some entries and short for others creating unwanted spaces. I also cannot get the HTML export to export one car id per page.

    Thanks,
    Al

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    ...thats not down to the HTML.... thats down to how YOU process the information. HTML is static formatted text. 'All' you need to do is design your first page, view the final HTML and then merge that with the data from our DB. creating a new page for each relevant record from the DB.

    you will not get what ou want by exportign from within Access.. I think you will haev to write a process that creates individual pages of HTML.
    I'd rather be riding on the Tiger 800 or the Norton

  7. #7
    Join Date
    Apr 2009
    Posts
    6
    healdem,

    What do you mean by "write a process that creates individual pages of HTML?" Is this some kind of module or macro? Can you elaborate a little...

    Thanks,
    Al

  8. #8
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    write a form or function which creates a series of files for output
    then extract the data from the db in the form and style that you want
    format it according to HTML standards
    write the data to a file with the extenstion of HTM or HTML
    create a separate file for each object as required.

    best prototypoing methiod in my books is to create the HTML page using whatever editor or mkechainsm you prefer. then look at that html output and adapt it. as most of the html is going to be indentical you could probably wrap it it a function

    eg WriteHTMLPage(my,list,of,bits,to,insert)
    open a file
    write #1,"<HTML><HEAD>....blah di blah</HEAD><BODY>"
    write #1,blah di blah
    write #1,"</BODY></HTML>"
    close #1



    have a look at an HTML file, edit one or view the source.. they are not that complex of difficult to comprehend
    have a look in the Access help system for details on writing to files...
    hvae a look at open, write, read append etc....
    I'd rather be riding on the Tiger 800 or the Norton

  9. #9
    Join Date
    Sep 2006
    Posts
    265
    You can querystrings in asp by marrying up the SQL WHERE with the querystring on each page request. These can be fired up from Access.

    Simon

  10. #10
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    but the OP doesn't want to use a server side scripting language.. perhaps his class hasn't covered that
    I'd rather be riding on the Tiger 800 or the Norton

  11. #11
    Join Date
    Sep 2006
    Posts
    265
    Having used both server-side scripting and flat html and I would always use ASP rather than html.

    Simon

  12. #12
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    I agree
    this is a task for server side scripting, possibly AJAX/WEB 2.0
    but the OP wants flat static HTML.
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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