PDF::ReportWriter::Datasource::DBI
Custom Datasource class that allows access to a generic DBI DSN.
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>
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?
To install PDF::ReportWriter, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PDF::ReportWriter
CPAN shell
perl -MCPAN -e shell install PDF::ReportWriter
For more information on module installation, please visit the detailed CPAN module installation guide.