in reply to Report writing

Hey,
I don't know how it scales to complex reports, but some people tend to forget that Perl was initially designed to extract AND report. I can produce some nice preformated reports with it (you can even tweak it to produce HTML).

You may want to look at the perlform for more info on the subject.

my($a,$x,$f)=('','$a');$f='@>>>++;';$^A='';formline($f,$x);eval$^A;

<kbd>--
PerlMonger::Paris(http => 'paris.pm.org');</kbd>

Replies are listed 'Best First'.
Re: Re: Report writing
by Jonathan (Curate) on Feb 15, 2001 at 15:00 UTC
    Ta for that OeufMayo I've used formats for reports but they become very unwieldy with complicated wide reports with multiple variable blocks and sub totals etc.
    I think Data::Reporter::RepFormat is a reasonable choice, but - if only it worked :-)
    the following the following code falls in a heap
    #!/usr/local/bin/perl -w use strict; use Data::Reporter::RepFormat; my $sheet = new Data::Reporter::RepFormat(124,10) or die "Wouldn't let me"; $sheet->Move(120,0); $sheet->Print('TEST'); $sheet->MVPrint(0,1,'Next line at start'); $sheet->Move(0,2); print "Report has ", $sheet->Nlines()," lines\n"; $sheet->Out();
    Falls over in a horrible heap with
    Report has 3 lines Can't locate object method "Out" via package "RepFormatPtr" at /home/jonathan/Reportformat.test line 12.
    From my reading of the pod I'd expect the above to work and print the report to STDOUT. Doh!