HTML template for database report

Andrew Henshaw andrew.henshaw at gtri.gatech.edu
Mon Feb 28 15:58:52 EST 2000


Has anyone developed a system for generating a database report (I'm
thinking of an MS Access-type report) using a template made from an HTML
file.  If not it would seem like a nice Python project for me.

First of all, I'm aware of the use that Access has for an HTML template
and that seems very restrictive and not well suited.  What I'd like is
something that combines the capabilities of the Access report designer
with HTML formatting.

What I have in mind would be a template that might look something like
this (the tags that I'm making up would be embedded in HTML comments):

<report database="database" record_source="table or query">

  HTML here

    <group_header field="field 1" sort=ascending|descending>
      some more HTML   
    </group_header>
    
      <detail>
        <item field="field 2"> <item field="field 3">
      </detail>

    <group_footer>
      some more HTML
    </group_footer>
  
  some more HTML
 
</report>

I could then pass this to some Python code that would extract the data,
format it, and generate the output.  This way, when I customize my
reports, I can focus on a single file.

This seems useful, so it must have already been done.  If so, where? If
not, any suggestions?

Andrew Henshaw
andrew.henshaw at gtri.gatech.edu



More information about the Python-list mailing list