Data::Report - A flexible framework for reporting |
|||||
|
|||||
|
|
||||
DescriptionData::Report provides an easy API to define the layout of a report in terms of rows and columns. The application then just feeds the data row by row. Plugins take care of the details of report generation, using stylesheet-like controls for details like breaks. Standard plugins are provided for text reports, HTML and CSV. Exampleuse Data::Report; my $rep = Data::Report::->create (type => "text", layout => [ { name => "acct", title => "Acct", width => 6, align => ">" }, { name => "desc", title => "Report", width => 20, }, { name => "deb", title => "Debet", width => 10, align => ">" }, { name => "crd", title => "Credit", width => 10, align => ">" }, ], ); $rep->start; $rep->add({ acct => "8995", desc => "Received", deb => "100.00" }); $rep->add({ acct => "4980", desc => "Paid", crd => "100.00" }); $rep->add({ deb => "100.00", crd => "100.00", desc => "TOTAL" }); $rep->finish; This produces a basic textual report like this: Acct Report Debet Credit ---------------------------------------------------- 8995 Received 100.00 4980 Paid 100.00 TOTAL 100.00 100.00 By changing View the slides from the Data::Report presentation.
|
|||||
|
|
||||
© Copyright 2003-2018 Johan Vromans. All Rights Reserved. |