Generating a Database Report via LaTeX

Tagged: ,

Viewing 0 reply threads
  • Author
    Posts
  • March 24, 2012 at 3:11 PM #3640

    DrJJWMac
    Participant

    For those who know LaTeX, I am reporting a basic example of how to create a report from your TapForms database. As a start, you should likely have all fields in the database named only by one word. I cannot vouch for how to work this with long field names. First, create a folder for the report. Export the form as csv and all of the associated photos (as jpg), and put all of them in to the report folder.

    My example is a database exported as housenotes.csv with fields Title (text), Photo (photo), Notes (note), and When (date). Here is a simple LaTeX template that shows the records as one per page. I do not display the When field. You may need to install the datatool package.

    **********

    documentclass[12pt]{article}

    usepackage{datatool,graphicx}

    DeclareGraphicsExtensions{.jpg}

    DTLloaddb{housenotes}{housenotes.csv}

    begin{document}

    DTLforeach*{housenotes}{title=Title,figure=Photo,notes=Notes}{%

    subsection*{title}

    includegraphics[width=0.75textwidth]{figure}

    notes

    clearpage

    }

    end{document}

    **********

    JJW

Viewing 0 reply threads

You must be logged in to reply to this topic.