Text::Report

Text::Report is a Perl extension for generating mixed columnar formatted reports and report templates.
Download

Text::Report Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • David Huggins
  • Publisher web site:
  • http://search.cpan.org/~davidius/Text-Report-1.004/lib/Text/Report.pm

Text::Report Tags


Text::Report Description

Text::Report is a Perl extension for generating mixed columnar formatted reports and report templates. Text::Report is a Perl extension for generating mixed columnar formatted reports and report templates.SYNOPSIS use Text::Report; # Let's build a simple report complete with title lines, footer # and two disparate data sets in tabular form # Create a new report object: $rpt = Text::Report->new(debug => 'error', debugv => 1); # Create a title block: $rpt->defblock(name => 'title_lines'); # Create a separator: $rpt->insert('dbl_line'); # Create a data block: $rpt->defblock(name => 'data1', title => 'Statistical Analysis Of Gopher Phlegm Over Time', useColHeaders => 1, sortby => 1, sorttype => 'alpha', orderby => 'ascending', columnWidth => 14, columnAlign => 'left', pad => {top => 2, bottom => 2},); # Create another data block: $rpt->defblock(name => 'data2', title => 'Resultant Amalgamum Firnunciation Per Anum', useColHeaders => 1, sortby => 1, sorttype => 'numeric', orderby => 'ascending', columnWidth => 10, columnAlign => 'right', pad => {top => 2, bottom => 2},); # Create a separator: $rpt->insert('dotted_line'); # Create a footer block: $rpt->defblock(name => 'footer'); # Add column headers: @header = qw(gopher_a gopher_b gopher_c bobs_pudding); @header2 = qw(avg mean meaner meanest outraged paralyzed); $i = 0; for(@header){$rpt->setcol('data1', ++$i, head => $_);} $i = 0; for(@header2){$rpt->setcol('data2', ++$i, head => $_);} # Change column settings for 'bobs_pudding' data: $rpt->setcol('data1', 4, align => 'right', width => 16); @data = ( , , ,); @data2 = ( , ,); # Fill our blocks with some useful data: $rpt->fill_block('title_lines', , ); $rpt->fill_block('data1', @data); $rpt->fill_block('data2', @data2); $rpt->fill_block('footer', , ); # Get our formatted report: @report = $rpt->report('get'); # Print report: for(@report){print $_, "n";} Simple Report Baltimore Zoological Research Lab =========================================== STATISTICAL ANALYSIS OF GOPHER PHLEGM OVER TIME ----------------------------------------------- gopher_a gopher_b gopher_c bobs_pudding ______________ ______________ ______________ ________________ a1 a2 a3 b4 b1 b2 b3 c4 c1 c2 c3 c4 RESULTANT AMALGAMUM FIRNUNCIATION PER ANUM ------------------------------------------ avg mean meaner meanest outraged paralyzed __________ __________ __________ __________ __________ __________ 123.62 191.25 14.62 52.58 63.14 256.32 562.93 121.87 53.95 46.05 39.00 129.00 ................................................................................ Acme Cardboard - All Rights Reserved Apache Junction, Arizona Beautiful isn't it. And the coolest thing... You can save the report template and use it over and over and over...Requirements:· Perl Requirements: · Perl


Text::Report Related Software