[reportlab-users] First report, complete with graph and database

Bill Harris bill_harris at facilitatedsystems.com
Thu Feb 4 21:00:14 EST 2010


I am trying to create my first real reportlab report. I've followed
some of the examples at
http://www.protocolostomy.com/2008/10/22/generating-reports-with-charts-using-python-reportlab/,
and they were helpful.

What I want to do is create a one-page landscape report with, roughly,
two columns of differing width. I'll use a company logo, I'll have both
a line graph and a table of data, and I'll have some text (both flowing
paragraph text and something like lists ( the recipients name and
address, etc.). The database is likely SQLite.

I also found http://www.reportlab.com/snippets/5/, which looks
promising. I'm looking at http://docs.python.org/library/sqlite3.html,
as well.

Is there a good spot to learn this efficiently? Are these three good
resources for line graphs, SQLite connections, and putting them
together?

I did make a connection to another SQLite database I had by simply doing
an

import sqlite3
con = sqlite3.connect("dbname")
c = con.cursor()
c.execute('sql statement')
for row in c:
print row

c.close()

I also found
http://www.eecho.info/Echo/python/getting-started-with-reportlab-tutorial/,
which seems promising,

I've programmed in J, but reportlab looks like it's the right tool for
this job. I've read about Python and programmed a very little in
Python, but I'm by no means proficient yet. Am I on the right track?

Right now, I'm doing this in Linux; I'll be doing it on an XP machine
for real.

Thanks,

Bill
--
Bill Harris http://facilitatedsystems.com/weblog/
Facilitated Systems Everett, WA 98208 USA
http://facilitatedsystems.com/ phone: +1 425 374-1845


More information about the reportlab-users mailing list