Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    Text::Report 1.004

    Download button

    No screenshots available
    Downloads: 330  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    David Huggins | More programs
    GPL / FREE
    November 5th, 2007, 06:05 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    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 = (
    ['a1', 'a2', 'a3', 'b4'],
    ['b1', 'b2', 'b3', 'c4'],
    ['c1', 'c2', 'c3', 'c4'],);

    @data2 = (
    ['562.93', '121.87', '53.95', '46.05', '39.00', '129.00'],
    ['123.62', '191.25', '14.62', '52.58', '63.14', '256.32'],);

    # Fill our blocks with some useful data:
    $rpt->fill_block('title_lines', ['Simple Report'], ['Baltimore Zoological Research Lab']);
    $rpt->fill_block('data1', @data);
    $rpt->fill_block('data2', @data2);
    $rpt->fill_block('footer', ['Acme Cardboard - All Rights Reserved'], ['Apache Junction, Arizona']);

    # 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



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    formatted reports | report templates | Perl module | report | template | Perl

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM