NAME

DBIx::ReportBuilder - Interactive SQL report generator

VERSION

This document describes version 0.00_14 of DBIx::ReportBuilder, released November 13, 2003.

SYNOPSIS

    use DBIx::ReportBuilder;
    my $obj = DBIx::ReportBuilder->new(
        Driver      => 'mysql',
        Host        => 'localhost',
        User        => 'rt_user',
        Password    => 'rt_pass',
        Database    => 'rt3',
    );

    $obj->PartInsertP( text => "My Test Report" );
    $obj->PartInsertTable( table => 'users', text => 'User List' );

    $obj->ClauseInsertLimit( field => 'id', operator => '<', value => 20 );
    $obj->ClauseInsertCell( field => 'id', text => 'Id' );
    $obj->ClauseInsertCell( field => 'name', text => 'Name' );

    $obj->ClauseUp;             # move up; switch Name and Id
    $obj->ClauseDown;           # move down; switch Name and Id back
    $obj->ClauseRemove;         # delete the current clause

    print $obj->RenderHTML;     # prints a HTML rendered document
    print $obj->RenderEdit;     # prints an interactive Web UI
    print $obj->RenderPDF;      # prints PDF (not yet)

DESCRIPTION

This module is a subclass of XML::Twig, specially tailored to render SQL reports in various formats, based on DBIx::SearchBuilder.

Its API is designed to interact with users via RTx::Report's Web UI, which can incrementally construct complex reports.

NOTES

This is PRE-ALPHA code. Until the official release of RTx::Report, using this module for anything (except for learning purporses) is strongly discouraged.

For more details on how to use this module, see the t/1-basic.t file in the source distribution.

METHODS

new(%args)

Constructor. Takes either a DBIx::SearchBuilder::Handle object as the named $Handle parameter, or a set of parameters for DBIx::SearchBuilder::Handle::new.

Also takes an optional $Content parameter to parse; if unspecified, use the default blank content structure.

SEE ALSO

RTx::Report, XML::Twig, DBIx::SearchBuilder

AUTHORS

Autrijus Tang <autrijus@autrijus.org>

COPYRIGHT

Copyright 2003 by Autrijus Tang <autrijus@autrijus.org>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://www.perl.com/perl/misc/Artistic.html