Re: Designing reports in Cocoa apps
Re: Designing reports in Cocoa apps
- Subject: Re: Designing reports in Cocoa apps
- From: Bill Cheeseman <email@hidden>
- Date: Sun, 19 Oct 2008 05:36:38 -0400
- Thread-topic: Designing reports in Cocoa apps
on 2008-10-18 7:51 PM, Kyle Sluder at email@hidden wrote:
> Others go the traditional route and write a custom NSView that they
> print. You have to draw it yourself, but this gives you far more
> control -- particularly useful when you want to know about the paper
> size and orientation, or other variables specific to printing. You'll
> get better results this way, but you'll probably put a lot more effort
> into it.
For the kind of report the op is talking about, it may require very little
effort. A financial summary is probably short, and it probably has a fixed
format. For a report like that, I simply build up a single
NSMutableAttributedString/NSTextStorage object containing the entire report
and its formatting, then display it on screen and print it in an NSView.
It's pretty easy to set up the printing margins, headers and footers, paper
sizing and so on in the print dialog using existing Cocoa facilities
(especially in Leopard).
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
www.quecheesoftware.com
PreFab Software - www.prefabsoftware.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden