Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Avoiding reinventing the wheel: report generation systems?

by rkg (Hermit)
on Aug 27, 2003 at 22:48 UTC ( [id://287196]=perlquestion: print w/replies, xml ) Need Help??

rkg has asked for the wisdom of the Perl Monks concerning the following question:

Hi!

I am looking for a perl-based report generation package, or a perl interface to an open-source report generation package. I did some searching around the monestery, on Google, and on CPAN, and did not locate much, so I seek the wisdom of the monks.

I would like the ability to generate attractive reports consisting of formatted text paragraphs, tables, and graphs. I'd like to separate data from presentation, using XML to describe the reports. I'd like the ability to render a report as HTML, PDF, flat text, or even Excel (the tables). I'd like auto-numbering of sections and auto-generation of the table of contents. I'd like to keep the formatting code of out the rendering engine, ala Template Toolkit.

Is there a system out there I should consider? I'd very much prefer not to reinvent any wheels, so before I pull out Template Toolkit, Spreadsheet::WriteExcel, XML::Parser, etc. etc., I'd welcome any or any leads or suggestions.

Thanks!

rkg

Replies are listed 'Best First'.
Re: Avoiding reinventing the wheel: report generation systems?
by cleverett (Friar) on Aug 28, 2003 at 02:09 UTC
    No, I looked for such a thing for quite a while without finding it. The only one I know of in Perl is closed source. It's something I've wanted to do for quite a while now, but more important things keep coming up.

    The best architecture I saw out there (look at this guys old YAPC presentation) put the raw report data into XML form and used XSLT on that to create HTML, CSV, PDF, Excel, etc. To my mind this seems to be the lowest effort way of doing it, because with any luck, you just need a single piece of XSLT for each one of the output file types with a second piece to customize colors, fonts, etc.

    As far as a report description format goes, XML isn't particularly human readable IMO, so I'd advise _not_ using XML. With a flat text file report description, you can create new reports the Unix Way (TM): with a text editor.

    I'm working on my own report generator package in between all my pressing emergencies.

    Until that's finished, all the stuff I need to put into production tomorrow I do with TT using plugins, which gives me the most report for the least programming.

Re: Avoiding reinventing the wheel: report generation systems?
by CombatSquirrel (Hermit) on Aug 28, 2003 at 00:48 UTC
    Your question is not really specific. Please provide more information, e.g.: do you have to create just one type of report, a class of similar reports, reports of varying formats, etc.
    Until then, I can just answer: Yes, there definitely is a system out there that you should consider ;-)
    Cheers, CombatSquirrel.
    Entropy is the tendency of everything going to hell.
      Apologies for a vague specification. Desired features:
      • Several (10+) different types of reports
      • Common graphic design
      • Reports are static -- not interactive CGI apps.
      • Reports contain both text and tables and figures. Some text is stock, others are templated.
      • Reports are rendered for different media: html for intranet (one page with internal links), for paper (pdf with sensible page breaks), et.

      Here's an example of a templated section, written in psuedo TT2 code ...

      ## PSUEDO CODE "Parsing [% num_major_files %] files generated a total of [% num_major_incidents %] incidents, falling into [% num_classes %] classes. Table [% an autogenerated table number would go here %] presents the top 10 incident categories. Note that [% top_incident_class %] comprises [% top_fract %] of the cases ....
      A good DTD would get me much of the way there. I'm seeking an decent XML spec for sections, tables, figures, captions, etc. rkg
        I couldn't find any module on CPAN that seems to do what you need. The modules you suggest seem reasonable, though. Also have a look at Chart::Base for generating diagrams, though. And good luck with this one.
        Cheers, CombatSquirrel.
        Entropy is the tendency of everything going to hell.
Re: Avoiding reinventing the wheel: report generation systems?
by Anonymous Monk on Aug 28, 2003 at 19:51 UTC
    One would think that there would be plenty of Report modules on CPAN, but, Data::Reporter is the only one that sounded close to what you are looking for.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://287196]
Approved by The Mad Hatter
Front-paged by broquaint
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-03-28 17:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found