# Report generation

**URL:** <https://www.ruby-forum.com/t/report-generation/155304>\
**Category:** Rails\
**Created:** [December 10, 2008, 12:57pm UTC](https://www.ruby-forum.com/t/report-generation/155304 "2008-12-10T12:57:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![subhadip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3d9bf3/32.png) [@subhadip](https://www.ruby-forum.com/u/subhadip)\
**Post date:** [December 10, 2008, 12:57pm UTC](https://www.ruby-forum.com/t/report-generation/155304/1 "2008-12-10T12:57:01Z")

</div>

Hi,  
i will want to generate a report based on some data in a text file.  
is it possible in ruby on rails for rails version 2.2.2.  
please give some hints or tutorial.

```
                     Thanks
```

---

<div class="post-metadata">

**Author:** ![subhadip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3d9bf3/32.png) [@subhadip](https://www.ruby-forum.com/u/subhadip)\
**Post date:** [December 11, 2008, 8:25am UTC](https://www.ruby-forum.com/t/report-generation/155304/2 "2008-12-11T08:25:48Z")

</div>

If you want to deliver a report in file format, you need to use the  
send\_data method in the controller. This causes the user to see the  
download dialog delivering a file for the user to view/save.

How to format the report is another issue. I use pdf-writer plugin  
which allows creation of a pdf file format. It is a bit fiddly to  
use, but is not bad, once you have got your head round how to layout  
various elements. The table format can be a bit limited. (A new pdf  
creator called prawn is under development which).

Tonypm
