Printing large DB reports
Printing large DB reports
- Subject: Printing large DB reports
- From: Aaron Burghardt <email@hidden>
- Date: Tue, 19 Apr 2005 20:41:23 -0400
Hi all,
I am generating reports from a database and could have millions of
records to print in a given report. The documented Cocoa approach for
printing would be to draw into a custom view and to paginate the view
accordingly (either automatically or a custom pagination scheme).
This leads me to two problems/questions:
1. Since dimensions are in floats, the precision for drawing on page
10,500 is about 1 point (assuming 1 unit per point and no scaling).
Somewhere around this page count, I won't be able to accurately place
elements on the page.
2. I have some text fields that won't fit in one line of text and I
need to wrap the text and include it in the report. I don't want to
waste paper, so I intend to use only as much vertical space as
necessary for each record. As a consequence, I don't know up front
how many pages I will be printing unless I do a "dry-run" first to
calculate it.
For the first problem, I plan to just use a view that is one page in
size and render each page individually. Does this approach make sense?
The second problem is tougher. With Cocoa's pagination options, I
don't see how to avoid having to know either the overall view size
(for auto-pagination) or the full page count (for custom pagination).
Can I report some arbitrary large page count, like 1,000,000, and
then stop the print operation when I run out of records, or will
Cocoa print all 1,000,000 pages? Any suggestions on this?
Thanks!
--
Aaron Burghardt
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden