[thelist] reporting, line count, many pages, best practices

VOLKAN ÖZÇELİK volkan.ozcelik at gmail.com
Thu Nov 17 16:13:34 CST 2005


Hi list !

Sory I couldn't find a clearer title but it just summarizes my current
situation.
Probably I'll need a hand-crafted custom solution but asking you first
in case you may have encountered a similar situation before.

We plan to design a web-based reporting application which will output
several hundreds of pages of output at each execution.

The reports will be something like this

+ header line 1
+ header line 2
+ header line 3
+ captions
+ item A someValue someOtherValue yetAnotherValue ...
+ item A someValue someOtherValue yetAnotherValue ...
...
+ item A someValue someOtherValue yetAnotherValue ...
+ ---------------------------------------------------------------------------------
+ total for item A
+ ---------------------------------------------------------------------------------
...
+ item B someValue someOtherValue yetAnotherValue ...
+ item B someValue someOtherValue yetAnotherValue ...
...
+ ---------------------------------------------------------------------------------
+ total for item B
+ ---------------------------------------------------------------------------------
+ item C someValue someOtherValue yetAnotherValue ...

... as much as possible to fit betweeen header and footer ...

+ item C someValue someOtherValue yetAnotherValue ...
+ ---------------------------------------------------------------------------------
+ PAGE TOTAL

page 2:
HEADER AND CAPTIONS (4 lines total)
+ item C someValue someOtherValue yetAnotherValue ...
+ item C someValue someOtherValue yetAnotherValue ...
+ ---------------------------------------------------------------------------------
+ total for item C (note that item C has leaked to the next page)
...
CONTENT
PAGE TOTAL

...

page n:
HEADER
CONTENT
PAGE TOTAL
GRAND TOTAL

* * *
Everything is variable. There are n items, n item totals. Each item
category may consist of  a variable number of lines (depending on how
many records are registered for that particular item in the DB, that
number changes each day as well).

The pages will consist of exactly 66 lines (at least line count is constant)

The printers will be set to have zero paddings, zero margins.

And not to mess things up we'll use a fixed-height, fixed with font
(most probably Andale Mono or Courier New)

When I start to write a pseudocode it ended up something like this:

0  cnt = (# of remaining items in A)
10 if cnt will take more than a page
20  write 66 less (# of lines in header footer and caption) lines of item A
30   print footer
35   decrease the number of items remaining in A
40   print header, print captions
50   GOTO 0

(no the app. is not in QBasic, it will be a JSP page. I just missed my
Commodore64 days :) )

Now assume that listing of item A finishes in the middle of fifth
page. I have to calculate how many lines are available for item B
(which will be different in fifth page and in sixth page)

Plus, I have to take grand total into account which adds up to last
page's footer.
(each page has a page total as a footer (3 lines) but the last page
has a page total AND a grand total (6 lines) to complicate things
further)

It's a pretty dynamic report and I don't want things to get out of my
control in the middle of the design because I have overseen something.

When I think deeper and deeper, I realize that the design is gonna be
a real pain in the rear.

Have you been in a similar situation? If so how did you overcome it?

Do you have any suggestions/pointers ?

Are there special web-based tools (which if integrated into a JSP page
say will read from a bunch of linked lists and create a sensible
output in the form of TABLE's TH's and TD's) to leverage this task?
Although I'm specially interested in java-based solutions I'm open to
ASP, PHP and even dot net?
(Altough I prefer an open-source code piece with a low price margin;
'm open to good tools with generous pricing as well. Even a
high-priced but quickly adjustable enterprise solutions are okay as
long as they are good enough to keep the management happy and easily
adjustable to keep me happy)

I'm hopelessly asking for your help.

Thanks very much in advance;
--
Volkan Ozcelik
+>Yep! I'm blogging! : http://www.volkanozcelik.com/volkanozcelik/blog/
+> My projects/studies/trials/errors : http://www.sarmal.com/



More information about the thelist mailing list