Click to See Complete Forum and Search --> : Is there a Report Writer (like Crystal Reports)?
bwalling
10-11-2003, 09:38 PM
We do all of our development in .NET at work. I've ordered a server that I'm going to install Linux on to start doing some research into using it as a platform for our Intranet.
In .NET, we use Crystal Reports for all of our reports. It's got a great designer, and it very flexible in output - it can be viewed in a web page or an application and it can be exported to PDF, Word, Excel, etc.
In looking at PHP, Perl, and Python, the first thing that sticks out is that there is no report writer. Generating all reports as HTML is unacceptable because it cannot be adequately printed. Generating all reports as PDF is unacceptable because it is tedious and because of how slow to load it is in the browser (wait for Acrobat to load, etc).
Ideally, reports would output as HTML with an option to generate a PDF when the user wants to print. While I can code all of this by hand (for each report), it's great to have a report writer where I can graphically set up the report (it is light years faster, and I can safely assume that it performs all of the logic correctly).
Are there any report writers for Linux (open source or commercial) that work under PHP, Perl, or Python (preferably Python)?
bwkaz
10-11-2003, 10:03 PM
Write it in XML, or better, SGML / DocBook (this is basically just one specific set of XML tags, at least that's how I understand it). There are many, many different final formats you can put a document into when the original is SGML. PDF and HTML are two of them. PostScript (slightly better for printing; PDF is basically compressed PostScript, plus or minus a few things, and it's that "or minus" that worries me just a bit) is another.
I'm not sure how to actually do that, though, because I've never had to. But I'm sure there's documentation somewhere...
There are a couple of ways I can think of that you can make it work with Perl or Python or PHP. One, you could define an XML entity for each piece of data you want to embed in the report. Then use that entity wherever it's needed when making the XML files ("designing" the report). Then, when the Perl/PHP/Python script runs, make it define the entity to be whatever you need displayed (e.g. a field from your database, maybe).
Basically, you use a text editor to do your report writing, then let the programming language fill in the data.
Another possibility would be to search http://freshmeat.net for what you want. I would definitely not be surprised if someone's written what you need already.
You could also try either OpenOffice or AbiWord as your report writer (no idea how well this would work, but you're welcome to try). Put sample data in the thing while you're designing it, then edit it later and add an xinclude to the output of your script (the script would output a separate XML file defining all the entities), and also change out the sample data for the real entities you want to use.
AbiWord's native format already uses XML, and I believe that OpenOffice's format already does, as well. I just haven't thought all the way through this, to know whether there'd be any way to render the resulting XML file into PDF/HTML... so hmm.
(BTW: entities are things like > in HTML -- > is an entity for "the greater-than symbol". You could define an entity named, for example, &cust-name;, which would be defined as the current customer name by the Perl/PHP/Python script.)
bwalling
10-12-2003, 08:03 AM
There are only two report writers on FreshMeat, and they are too young to use.
Yes, I could use AbiWord or some other document writer. However, the power of Crystal is its understanding of data and record sets, and its ability to manipulate them. In order to use AbiWord et all, I'd have to write all the logic for page properties, record groupings, subtotals, formulae, formatting logic, etc. Crystal does all of this for you while letting you design your reports graphically (this is a huge time saver).
bwkaz
10-12-2003, 08:06 PM
How do you know they're too young? Many times stuff that's labeled "beta" is perfectly usable.
Does OpenOffice have anything specifically for this?
The thing with what you're talking about (having the report writer understand recordsets and whatnot) is that you tie your report writer into one specific database technology. In the Windows world, this was DAO, then RDO, then ADO, and now ADO.Net. The database access stuff just changes WAY too rapidly for a lot of open-source people to want to do that.
Did you see the UniPlex package? I have no idea how good it is, but it sounds like it might be a possibility.
Actually, never mind. I'm going to assume you didn't see this one. Sounds like it might be exactly what you want:
http://freshmeat.net/projects/agatareport/?topic_id=68
(I had to search for "report data", as in "something to make a report from a data base", not "report writer", to find this one, BTW ;))
bwalling
10-12-2003, 08:44 PM
That might work well. I've also since found JasperReports and DataVision, although both are Java related.
bwalling
10-12-2003, 09:45 PM
http://www.reportlab.org/index.html
This looks good as well. Uses Python. Runs on nearly all platforms.
sharth
10-12-2003, 10:08 PM
http://www.control.com/1003948909/index_html