views:

2580

answers:

8

I'm just starting out with Ruby/Rails and am wondering what Rails developers use to provide reports and/or charts on Rails sites. In ASP.NET I use the tools from DevExpress but I don't know enough about the Rails ecosystem to know what is available. Any insight would be appreciated.

+3  A: 

Well I'd say that most people write their own code to run reports from their data as it will mostly be specific to them. There are however a number of charting things that plug into a rails app quite easily.

There is also an apress book called Practical Reporting with Ruby and Rails which might be worth a look.

Good luck.

EDIT:

If you want to paginate data then will_paginate is the standard gem/plugin used by Rails developers, it's great and easy to use. For export to other formats there are several options. For PDFs there is Prawn, PDF::Writer or HTMLDOC, Prince is excellent but not free, but I think there is someone porting it to an open source library (if I remember right), and there are several libraries that can help you easily export to CSV files as well.

railsninja
Well, the idea with reporting is essentially that it gives you a way to easily achieve *paginated* data and that it permits export to PDF or other file formats. Just generating the data and printing Web pages is fine, but often not enough for my clients. +1 though - nice answer.
Mark Brittingham
+1  A: 

I used Open Flash Chart 2 before and it was very easy to use. You just make an array of key/value pairs and call ".to_json" on it.

Zepplock
+1 - Thanks for the recommendation!
Mark Brittingham
+2  A: 

I found Gruff Graphs to be very easy to use and it produced nice-looking graphs. There is also Sparklines for tiny, tiny graphs. If it turns out you need very specific kinds of generated images, you can check out RMagick.

Sarah Vessels
+1 - Thanks, Sarah. I'll check those out.
Mark Brittingham
From my experience, it is powerful tool, but setting up the dependencies (namely, ImageMagick) is a nightmare, at least on OSX. I still can't run a full gem update, because is blows up when trying to update RM (possibly just because of my both-left-hands type of setup tho ;) )
Toms Mikoss
+1  A: 

ruby gnuplot is not exactly a charting tool.. but I have used to make some pretty complicated graphs.. and think you might like it if you need to make some quick prototypes or wish to make charts that are not intended for end-users.

adi92
+1  A: 

It's not rails specific, but Google Visualization API is pretty cool.

Emprise also has some pretty nice looking graphs.

Joel Meador
+2  A: 

For reporting, you have

  • Ruport
  • Crystal Report
  • Microsoft SQL Server Reporting Services
  • Jasper Report

For simple pre-baked reports, Ruport should be fine. But if you need to deal with high volumes of reports and large dataset, go ahead and pick one of the next three.

Note: SQL Server Reporting Services can only work with SQL Server. The others are DB-agnostic.

Cygwin98
+1  A: 

Try out gerbilcharts, it does interactive charts using SVG.

+1 Thanks for the recommendation
Mark Brittingham
A: 

The Ext Javascript library has just released (as of v3.0) a new set of tools to generate Adobe Flash charts and graphs, just by programming in Javascript! It is all client-side, so you can use it with any backend webserver (Rails, PHP, ASP.NET, etc.)

Check out examples here:

ExtJS Flash Charting Examples

It is powerful and looks great. The nice thing is that since it is Javascript, you can create form fields that, once filled out, regenerate the graph using JSON/XML data from the server using the new data that the user just typed! It's pretty nifty.

Harmon