Post by JorilHi everyone!
I'm looking for a tool like Crystal reports or Visual Foxpro's report designer that would enable me to print from a wxWidgets C++ program while fetching data from a DB or a ResultSet..
I googled a little and came across Report Manager (http://reportman.sourceforge.net), but it's QT-binded (at least if you want preview capabilities) and I'd like to keep my application as dependency-free as possible..
Is there some alternative? Something like what Jasper reports does for Java would be perfect..
Many thanks for your time
I don't have a GUI-oriented solution. However, on a recent project I
had to develop reports with data coming out of an Access database. The
easy way -- the easiest I found to meet my requirements -- was:
. Access stores data
. wx app (using OTL[1] rather than wxODBC) pulls data out of Access and
writes an XML file[2]
. XSLT transformations from XML to another XML (aggregate information
from sections of the report, rather than run multiple queries in C++)
to XSL-FO + SVG (Formatting Objects for page layout, SVG for the
charts needed)
. FOP on the XSL-FO + SVG to make PDF
It was all hand-rolled, some of it in great haste (changes to user
requirements, dammit), but fairly easy to work with. *UNLIKE* the GUI-
oriented solutions, there was no macdinking required to get things to
line up, change column widths, etc. (my biggest beef with Crystal
Reports and the like, the amount of tiny manual changes that have to be
made to the report definitions... well, that, and being limited in how
they can fetch and manipulate data).
Toward the end of the project, I could throw together reports faster
(and better-looking) using these techniques than I was ever able to do
with Crystal Reports. With a bit more design and development I could
probably even build something a little more general purpose -- store
queries in data, describe in data how to manipulate the data for the
purpose of the report, etc.
(Part of the reason this was the easy way was because Access doesn't do
charts well... there *is* a component that should do it, but buggered if
I could ever figure out how to make it work without pain.)
[1] OTL == {Oracle|ODBC} Template Library: http://otl.sf.net
[2] Access can output XML for tables and queries, but I didn't have that
set up -- and couldn't rely on having the same version of Access
available at the client site. So: wx client to suck the data out of
the database and write XML
Keith
--
Keith Davies
***@kjdavies.org http://www.kjdavies.org/