[reportlab-users] Using reportlab to report on mysql data

Dukes Clayton Clayton.Dukes at HCAhealthcare.com
Thu Feb 23 17:23:43 EST 2006


(this email is best viewed in text mode)
Hi,
I think reportlab will use mysqldata for reporting, right?
Can someone tell me how I can get started with this?
Is there an interface somewhere that let's me input what tables to read
and then writes data based on that?

What I would like to do is:
I have a syslog database with several million lines in it.
I need to generate a script every day to report on the top 10 hosts so I
do (in mysql of course):

SELECT host, COUNT(*) as count FROM logs GROUP BY host ORDER BY count
DESC LIMIT 10;

Which gives me:
+--------------+-------+
| host         | count |
+--------------+-------+
| fwfdc-3060   | 62168 |
| 34222-3060   | 52068 |
| nandc-3060   | 48771 |
| nasun-6513   | 34942 |
| orodc-7325   | 34853 |
| 32801-3550   | 31342 |
| CORP-B31     | 28751 |
| 34703or-1750 | 23544 |
| 05332-3750   | 23404 |
| 34325-3060   | 19183 |
+--------------+-------+

Of course, I can do this in php and have nicer outputthan the mysql text
above, but I know diddly about python or reportlab.
Can someone help me make my boss(es) happy? :-)

Regards,
Clayton


More information about the reportlab-users mailing list