views:

913

answers:

3

I want to create a new "Business" application using the Django framework. Any suggestions as to what I can use as a reporting framework? The application will need to generate reports on various business entities including summaries, totals, grouping, etc. Basically, is there a Crystal reports-like equivalent for Django/Python?

A: 

These are just HTML templates with ordinary view functions.

This doesn't require much: Parameters come in from a form; write the query in the view function, passing the queryset to the template. The template presents the report.

Why would you need something more than this?

You can use generic list/detail views to save yourself from having to write as much code. If you go this route, you provide the query set and the template to a generic view that handles some of the processing for you.

Since you must write the query in Crystal reports or Django, you're not really getting much leverage from a "reporting" tool.

S.Lott
With a good reporting framework, you get multiple display views and sorting, and the need to create templates is eliminated.
Daniel
@Daniel: with a "good" reporting framework... Nice sentiment. Any examples or suggestions? You can write a generic template for simple columnar reports very quickly. Not sure I see what would make a reporting tool any better than simply doing the obvious in Django.
S.Lott
@S.Lott, reporting frameworks are useful when you want *more* than a simple flat table of data. eg, newforms is pretty nice, but that doesn't make the admin interface overkill.
Daniel
+1  A: 

This looks promising, although I haven't tried it yet:

http://code.google.com/p/django-reporting/

Daniel
You should say that this is alpha, has two opened bugs and the project activity is less than you could expect.
Sorin Sbarnea
+1  A: 

I don't know about complete reporting solution for Django (or Python), but make reporting with Django is quite easy with or without ORM:

  • django-tables can give you very basic structure for handling table data (asc/desc server-side sorting etc)
  • you can use standart django 1.1 queryset aggregates (django-reporting uses them) for totals/subtotals stuff.

Personally I use django-tables and neithere's datashaping python package for quick summary/avg/median/IQR/filtering stuff because I have many different data sources (REST data, two mysql dbs, csv files from R) with only few of them in django db now.

Pycha is one of candidates for me to draw simple charts.

I don't like client-side ajax-based grids etc for reporting, but you can use it with django templates too.

zzr