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. | [reply] |
| [reply] |
I'm a little confused as to the problem here. Most templating systems have a looping construct. They also allow you to know whether you're in an odd or even row. Just vary the background depending on the row number's modulo 2. Or, would that not work?
------ 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.
| [reply] |
| [reply] |
I like that universal template. I think I can use is somewhere.
| [reply] |
| [reply] |
This has some of what I'm looking for, but it doesn't seem
to do subtotals and subheads AFAICT, and it only uses Perl
formats.
| [reply] |