I’m about to embark on writing some kind of report designer/generator in
Rails and was wondering if anyone had done anything like this before and
could give me some pointers. The output format will usually be CSV.
It seems to me that the process can be split up into a few separate
Data gathering. I am planning to do this by letting the user define a
of ‘rules’ which each return a bunch of objects, similar to what Trac
you to do. The data to be used in the report can be retrieved by joining
result of all the rules. I’m not convinced this is the best approach.
Layout. For CSV, this is simply the columns they want to have
This could be done with a bunch of pre-defined columns that they can
or possibly generated from the columns of the model. I also may allow
advanced and trusted users to define columns with snippets of Ruby code.
Very dangerous I know, but it might be worth it.
Generating the CSV. Pretty straight forward. Could use Ruport for
Any advice, links to existing projects etc… would be most