public
Description: create reports via sql or ruby code for your rails app in minutes
Homepage: http://upstream-berlin.com/blog/open-source/#dead_simple_reports
Clone URL: git://github.com/langalex/dead_simple_reports.git
Alexander Lang (author)
Mon Jul 07 10:26:07 -0700 2008
commit  e8861b75c47b2f0bb7792bbece62ebbc1e5ed2ea
tree    5e999ac9f9df971e0775724f21f22053e22a9eb3
parent  40201b24606610377f61e45c90830fa7b98e5e7e
name age message
file INSTALL Sat Apr 12 13:45:18 -0700 2008 added gem requirements notice to installation i... [Alexander Lang]
file MIT-LICENSE Fri Apr 11 05:59:44 -0700 2008 first commit [Alexander Lang]
file README Sat Apr 12 13:22:18 -0700 2008 added excel to readme, removed files containing... [Alexander Lang]
directory generators/ Fri Apr 11 05:59:44 -0700 2008 first commit [Alexander Lang]
file init.rb Sat Apr 12 12:51:43 -0700 2008 added excel format reports via the spreadsheet-... [Alexander Lang]
file install.rb Sat Apr 12 12:51:43 -0700 2008 added excel format reports via the spreadsheet-... [Alexander Lang]
directory lib/ Mon Jul 07 10:26:07 -0700 2008 now showing column names in first row in sql re... [Alexander Lang]
directory spec/ Mon Jul 07 10:26:07 -0700 2008 now showing column names in first row in sql re... [Alexander Lang]
directory views/ Sat Apr 12 13:32:47 -0700 2008 changed file extension of views to rails 2 form... [Alexander Lang]
README
== dead simple reports ==

this rails plugin allows you to easily create and view arbitrary reports of your database tables. it therefore creates a 
reports controller with views and a report model in your application. to create a report you simply create an instance 
of Report. it then appears in the list of reports where you can view it either as html, csv or xls table.

=== to create a report ===

Report.create! :name => 'My Ruby Report', :kind => 'code', :code => 'User.find(:all).map(:&name)'

This will generate a report that lists all user's names. 

Alternatively you can create a sql report:

Report.create! :name => 'My SQL Report', :kind => 'sql', :code => 'SELECT name FROM users'

to view the list of reports just go to http://localhost:3000/reports

=== customizing the views ===

to customzie the views you can simply edit the files under app/views/reports in your application.

== customizing the controller ==

to customize the controller you can add code to the app/controllers/reports_controller file generated in your 
application.


=== contact ===

for hints, questions etc. please email alex[at]upstream-berlin.com