# Reporting and rapid CRUD with Rails

**URL:** <https://www.ruby-forum.com/t/reporting-and-rapid-crud-with-rails/75861>\
**Category:** Rails\
**Created:** [November 13, 2006, 10:18pm UTC](https://www.ruby-forum.com/t/reporting-and-rapid-crud-with-rails/75861 "2006-11-13T22:18:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bjhess](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ce7236/32.png) [@bjhess](https://www.ruby-forum.com/u/bjhess)\
**Post date:** [November 13, 2006, 10:18pm UTC](https://www.ruby-forum.com/t/reporting-and-rapid-crud-with-rails/75861/1 "2006-11-13T22:18:41Z")

</div>

Good afternoon (CST, anyway),

I’m researching a rapid development tool for an insurance company. The  
tool would be used for small data stores with very, very few users.  
This problem is not in the realm of enterprise application development.

I really like how quickly RoR apps can be created for basic CRUD  
functionality. However, one of the big features required here is a  
reporting solution that is quick and easy for the business. So a quick  
CRUD app could be built in RoR, but then how do we implement quick and  
painless reporting on the data? We would like to avoid mounds and  
mounds of custom code.

Just wondering if anything out there “snaps in” to RoR or if I need to  
be looking elsewhere. (Feel free to recommend where you think  
“elsewhere” is, too.) I’d like to do something with RoR because I  
think the framework could grow into more extensive use within the  
company in the future.

Thanks!

---

<div class="post-metadata">

**Author:** ![bjhess](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ce7236/32.png) [@bjhess](https://www.ruby-forum.com/u/bjhess)\
**Post date:** [November 13, 2006, 10:36pm UTC](https://www.ruby-forum.com/t/reporting-and-rapid-crud-with-rails/75861/2 "2006-11-13T22:36:45Z")

</div>

bjhess wrote:

> painless reporting on the data? We would like to avoid mounds and  
> mounds of custom code.
> 
> Just wondering if anything out there “snaps in” to RoR or if I need to  
> be looking elsewhere. (Feel free to recommend where you think  
> “elsewhere” is, too.) I’d like to do something with RoR because I  
> think the framework could grow into more extensive use within the  
> company in the future.

One way I implemented a fairly painless ad-hoc reporting for one of my  
rails apps was to create a view that has a bunch of fields/select boxes  
on it, one for each table column. The user simply clicks on each select  
option they want, enters freeform text into any text field, then clicks  
“submit”, behind the scenes in the controller, I build up a query string  
from all of the form fields, do the query, and return the results as a  
csv file.

The user can then save the csv file (or immediately open it in Excel)  
and they pretty much have a custom report ready to go.

So far, it’s worked well and it took a lot less time than having to  
build some custom report writer for them that spits out pdf files.

Jamey

Confidentiality Notice: This email message, including any attachments,  
is for the sole use of the intended recipient(s) and may contain  
confidential and/or privileged information. If you are not the intended  
recipient(s), you are hereby notified that any dissemination,  
unauthorized review, use, disclosure or distribution of this email and  
any materials contained in any attachments is prohibited. If you receive  
this message in error, or are not the intended recipient(s), please  
immediately notify the sender by email and destroy all copies of the  
original message, including attachments.

---

<div class="post-metadata">

**Author:** ![bjhess](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ce7236/32.png) [@bjhess](https://www.ruby-forum.com/u/bjhess)\
**Post date:** [November 14, 2006, 1:30pm UTC](https://www.ruby-forum.com/t/reporting-and-rapid-crud-with-rails/75861/3 "2006-11-14T13:30:28Z")

</div>

You might be interested in the ActiveWarehouse plugin. It provides a  
means for building drill-down reports on top of a multi-dimensional  
data warehouse. It may be beyond your needs but feel free to take a  
look and borrow what code you need (it’s open source). Also feel free  
to send me any questions or join the mailing list to contribute  
feedback.

[http://activewarehouse.rubyforge.org/](http://activewarehouse.rubyforge.org/)

Sincerely,  
Anthony E.

On 11/13/06, bjhess [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> CRUD app could be built in RoR, but then how do we implement quick and
> 
> >

–  
Email: removed\_email\_address@domain.invalid  
Cell: 808 782-5046  
Current Location: Melbourne, FL

---

<div class="post-metadata">

**Author:** ![bjhess](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ce7236/32.png) [@bjhess](https://www.ruby-forum.com/u/bjhess)\
**Post date:** [November 15, 2006, 10:25pm UTC](https://www.ruby-forum.com/t/reporting-and-rapid-crud-with-rails/75861/4 "2006-11-15T22:25:51Z")

</div>

Thanks for the responses, everyone.

Jamey, that gives me an idea that maybe we could create a generator for  
a “report generating” page. This page could be generated into any app  
and it would load up check boxes for each column grouped under table  
name headings. Hopefully it would be dynamic as the database changed  
over time.

Couple that with ruport and we might have a pretty functional system  
that requires little work to get up-and-running.

Anthony, ActiveWarehouse sounds interesting, though it isn’t  
necessarily what we’re going for in this instance. I’ll keep that in  
my back pocket, however.
