The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

PDF::ReportWriter::Datasource::DBI

DESCRIPTION

Custom Datasource class that allows access to a generic DBI DSN.

USAGE

Example of code fragment to include in your xml report:

	<report>
	...
	   <data>
	   ...
	   	<datasource name="customer">
			<type>DBI</type>
			<dsn>DBI:Pg:dbname=accounting</dsn>
			<user>postgres</user>
			<pass>postgres</pass>
			<sql>SELECT * FROM customers WHERE id=?</sql>
			<attr>
				<ChopBlanks>1</ChopBlanks>
				<PrintError>1</PrintError>
				<RaiseError>1</RaiseError>
			</attr>
		</datasource>
	   </data>
        ...
	</report>

ISSUES

Currently I don't know why with CSV driver this does not work. Probably it's necessary to tweak the csv_tables or csv_csv structure?

AUTHORS

Cosimo Streppone <cosimo@cpan.org>