Re: [Core Data - Newbie] Creating Reports
Re: [Core Data - Newbie] Creating Reports
- Subject: Re: [Core Data - Newbie] Creating Reports
- From: Charles Haron <email@hidden>
- Date: Thu, 28 Jul 2005 08:56:19 -0600
On Jul 28, 2005, at 7:11 AM, SA Dev wrote:
Charles:
What, specifically, do you mean?
I'm a former Delphi developer. So I'm used to a report generator
being bundled with my development tool. I wondering if there was an
existing framework, or third-party tool, for creating reports based
on Code Data data stores.
Saving things as PDF requires that you have something in a view
somewhere that you can get PDF data from and save as a PDF
document, or that you use the PDFKit, feed it some formatting and
text, then save it.
Saving as HTML is a little harder, as you'd need to build the
tags as strings for all your formatting and save it out.
Both these subjects are well documented and discussed in various
places (this list's archives included). However, you're putting the
cart before the horse. Actually *getting the report content* is the
hard part. "How" all comes down to "what". What do you want in your
report. Is the data it presents static (as in, a flat list of
"customer addresses") or is it user-defined (a rules-based report
where a user can say "all customers that purchased items within the
last six months and that live in the state of California")? The
former is easier, the latter probably isn't for newbies. ;-)
Whether it's user-defined or static, you need to build some sort
of query (that's where predicates come in), get the results, then
turn them into a pretty document of some kind. The simplest would
be to create an NSMutableAttributedString and append all your
nicely-formatted data, then hand it to an NSTextView (in memory -
remember to set its size!). You can print it directly, get PDF data
from it, or just save the whole thing outright as an RTF document.
I'll give this try.
There are likely better ways, but your question was very general,
so that's 'generally' how you could do it. :-)
On Jul 28, 2005, at 12:42 AM, Charles Haron wrote:
Hi All,
Now that I have a Core Data application, what is the best way to
generate reports for my data? I prefer to generate the reports in
PDF or HTML formats. Searches of the archive and http://
developer.apple.com/cocoa/, haven't been very successful.
I'm new to Cocoa and Core Data. Any suggestions, or tutorial
links, would be greatly appreciated.
Thanks,
Charles
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40silentalcove.net
This email sent to 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