[sclug] Form printouts from database

Alex Butcher lug at assursys.co.uk
Fri Mar 10 18:08:59 UTC 2006


On Fri, 10 Mar 2006, Peter Brewer wrote:

> I'm wanting to create highly formatted output for printing (preferably pdf) 
> from a databas - e.g. invoices with logos and tables etc etc.  Previously I 
> have used PHP and LaTeX for outputting printed reports from a database but 
> these have always been much more simple text based documents.  Does anyone 
> know a LaTeX package for doing more tightly designed outputs?  Alternatively, 
> is there any other way I can achieve this?

If it's a one-off and/or I can tolerate doing this manually, I'd be tempted
to try to use OpenOffice's database connectivity to do a 'mail merge'-type
approach. It can interface with MySQL, at least - I know, because I've done
this.

> I had (with great reservations) contemplated doing it in M$ Word with a mail 
> merge but the structure of the data is too complicated as it contains a 
> "one-to-many" table join.  Word can handle doing all the name, address, ref 
> numbers etc at the top of the invoice but I don't think it can handle doing 
> the repeated 'item, description, price' bits in the main body.  Am I right? 
> As far as I'm aware Word can only manage doing a mail-merge on a flat table 
> or query from a database.

Dunno about Word, and I don't know whether OO.o can do that either. Still,
it'd be quick to try in OO.o, compared with writing actual code.

> Pete

HTH,
Alex.
-- 
Alex Butcher      Brainbench MVP for Internet Security: www.brainbench.com
Bristol, UK                      Need reliable and secure network systems?
PGP/GnuPG ID:0x5010dbff                         <http://www.assursys.com/>


More information about the Sclug mailing list