Daniel Kasak > PDF-ReportWriter > PDF::ReportWriter::Datasource::DBI

Download:
PDF-ReportWriter-1.5.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  3
Open  2
View/Report Bugs
Module Version: 1.0   Source  

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>
syntax highlighting: