Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating nice printable reports...

Status
Not open for further replies.

greaver

Programmer
Apr 29, 2002
31
CA
Hey Guys,

Anyone have recommendations on how to generate nice printable reports? I have an existing VB app I would like to replace with PERL. My remaining issue is how to generate a WYSWIG screen preview and the associated printer output.

Sonny.
 
Perl was never developed as a wysiwyg language. If you want that, I suggest you stick to VB.
 
It looks like a world of hurt ahead, but look into Perl/Tk and see what you can find on GhostScript

HTH
--Paul

cigless ...
 
Thanks Paul,

I'll look into Ghostscript. I'm working with Perl/Tk at the moment but I wasn't aware of any 'printer' widgets...

Sonny.
 
Ack... looks like Ghostscript (despite its name) is really for viewing postscript not for generating it.

What I'm really looking for is a tool that I can use to configure about 6 canned reports. Each time I run a report the data that fills the report may be different but the format of the report stays the same. Ideally, these pre-canned reports can be invoked from the command line.

Sonny.
 
If the reports aren't too complex, maybe you could use perl formats (perdoc perlform) and display it in a monospace font in a text box
 
I suggest you do your reports as *.html produced by perl with cgi.

I made a cargo voucher, which we put on the web server of the company, and anyone who liked to print one, instead of filling out the voucher with a pen, was browsing the wep page where the voucher form was and he was filling the fields.

It took just a little more to adjust it, to be able to be print on the printer they use.

But everyone was more than happy when we finished it, and it works fine since.


``The wise man doesn't give the right answers,
he poses the right questions.''
TIMTOWTDI
 
Thanks for all of the suggestion folks. Good options to investigate further.

-perluserpengo:
How did you format your generated HTML so that when it was sent to the printer the pagebreaks were nicely located?

-PaulTeg:
I spoke too quickly about Perl/Tk. It looks like I could 'draw' my report using the Canvas widget and then invoke the postscript method to generate postscript file.
 
For your HTML to print in the right place, include this in your print output, after every so many records
Code:
<p style="page-break-before:always">

HTH
--Paul

cigless ...
 
Thanks guys.

I can't believe every other language (Java, VB, C++, etc..) has a suite of commercial and free report writer software. Stuff that behaves like Crystal Report for example. You drag objects into a workspace and create a report template. Hmmm... sounds like a good project for someone:") I can't believe someone hasn't taken up the challenge earlier....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top