There's a reason CrystalReports is ... less than ideal ... for most situations - it tries to do too much. Thus, it is extremely bloated and still doesn't do exactly what is desired.
My recommendation is that you do the following:
- Use one of the SQL catalog modules to manage your queries. Of course, this assumes your queries are this static.
- Build the templates. TT and Mason are both very good for developing against multiple output formats. HTML::Template and PDF::Template also take the same data structure, which makes things nice.
- Hook them together and go.
If you find a way to make this into a module or series of modules, post it!
Now, another way to go could be this, if your problemspace decomposes nicely. I started this process at MasterCard.
- Build a series of objects, representing reports. Each report would contain all the SQL needed to pull its data together, as well as all the organizational needs to build the appropriate data structure(s).
- Build templates to match each report.
I personally like that process because it allows for a lot of code reuse and decomposed my problemspace very neatly.
Of course, as with everything, YMMDWV. (Your Mileage Most Definitely Will Vary.)
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.