Reports, PDF, and grid widget for Python?

Paul Boddie paul at boddie.net
Tue Oct 22 06:35:02 EDT 2002


"Adams-Blake Co." <aremovethiscanton at adamsremovethis-blake.com> wrote in message news:<3db49604 at monitor.lanset.com>...
> 
> What I want to do is re-write the application found here:
> 
> http://www.adams-blake.com/item.asp?recordid=pubscreen&default=blankpagepub

I've had a reasonable amount of experience with applications like
this, some of them having less reports than this, but with others
emphasising reports a bit more (despite being very primitive in that
area). You could certainly implement it as a Web application, although
the "interaction patterns" might be a little different. I wouldn't
recommend doing a Java-based Web application for this, however.

> PUB123 is a fairly large application compared to your average Python script 
>  and while it's not complex, it has a ton of "features" that business 
> people "demand." One of these is the need to generate traditional business 
> reports.

Well, I don't think that many frequent contributors to
comp.lang.python are *only* writing scripts. Moreover, I think there's
some good advice to be had in this forum when it comes to design and
implementation issues, and I'd certainly advise you to digest that -
I've worked in at least one environment where there was a reluctance
to redesign and reimplement (although to your credit you do seem to be
fairly open-minded on the reimplementation issue) and the result in
one particular case was the ultimate but untimely realisation that the
existing implementation should not have been considered sacred. For
that particular company, the lesson was learned with the investment
draining away rather too quickly for anything to be done about it.

> And when you a complete analysis of our needs, MS.Net has everything we 
> want.... except for it being proprietary!! I don't mind working a little 
> harder to get a x-platform system, but I don't want to get into bit-twiddling 
> as we have a (small) budget and a short time frame to get this thing 
> (re)done.

I hate to sound controversial, but it's sound advice to recommend
avoiding .NET completely. Whilst some people may sound all pragmatic
and world-wise, saying that only reactionary philosopher types object
to Microsoft-style software licensing (for both developers and users),
I can imagine that it was exactly this kind of person who was
justifying heavy investments in Microsoft technology a few years ago
and who is now bitching loudly about being "screwed over" by
Microsoft's more recent policies.

[...]

> So I'm been looking at ASP.Net, PHP, JSP, and today someone (maybe you?) 
> turned me on to Zope. 
> 
> As for reporting needs, I don't want to pay a guy $60 an hour for 24 hours 
> times 50 reports to do down-and-dirty X,Y co-ordinate Python scripting in 
> ReportLab when the same guy using something like Datavision with Java (or 
> Crystal) can turn out the same report in 6 or 8 hours.

I can imagine that various open source reporting solutions exist, but
many of them that can be located using an Internet search might seem a
little "naive" for your purposes. There are plenty of interesting
projects which can produce the output you require at a higher level
than the explicit use of co-ordinates - the XSL-FO standard (for which
the Apache XML project has an implementation) could well be
interesting, and you could easily integrate this into a wider XML
strategy.

> I figure that the time to put up the web screens as well as the business 
> logic will be about the same no matter what language or platform we use... 
> but I like Python because it is so clean-looking and its ability to 
> prototype. And database is database (MySql). The one big problem we have is 
> reporting... and as this is a BUSINESS SYSTEM reports (via PDF) are a major 
> selling point. 

I would suggest looking at XSL-FO, then:

  http://xml.apache.org/fop/index.html

I used this about a year ago and it wasn't really as easy to produce
"salesperson ready" output as with standard HTML printed from Internet
Explorer, for example - there were various things that weren't
entirely implemented - but a year is a long time for such projects.

> Could we sit down and do our own report engine (in XML)? Sure. And lots of 
> people would say to do that. But I write the checks and I have to justify the 
> costs to my board and investors... and with the economy they way it is, there 
> is not an extra dime in our small budget. The only way for us to invent the 
> wheel is to go offshore... and I don't want to do that for philosophical and 
> patriotic reasons. 

I think that there's a lot of stuff you can make use of, even if it
doesn't necessarily appear that there's an open source product that
will do exactly what you want "off the shelf" (or rather, "from the
download site"). The challenge is probably finding the most
appropriate technologies and the most appropriate way of combining
them.

Paul



More information about the Python-list mailing list