# How to display sales report for each month

**URL:** <https://www.ruby-forum.com/t/how-to-display-sales-report-for-each-month/114775>\
**Category:** Rails\
**Created:** [September 17, 2007, 1:25pm UTC](https://www.ruby-forum.com/t/how-to-display-sales-report-for-each-month/114775 "2007-09-17T13:25:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/47e85d/32.png) [@Joen](https://www.ruby-forum.com/u/Joen)\
**Post date:** [September 17, 2007, 1:25pm UTC](https://www.ruby-forum.com/t/how-to-display-sales-report-for-each-month/114775/1 "2007-09-17T13:25:36Z")

</div>

Hi there, I’ve been developing a system using ruby but i’m still new  
with this language. I want to display a sales report for each month.  
Means that, user can select the start date and end date that they want  
to view. Then they will see the list of sales based on month. I’ve  
been doing this part for about 2 weeks but still can’t finish it.  
Anybody that can help me with this? Thanks in advance…

---

<div class="post-metadata">

**Author:** ![Joen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/47e85d/32.png) [@Joen](https://www.ruby-forum.com/u/Joen)\
**Post date:** [September 17, 2007, 10:40pm UTC](https://www.ruby-forum.com/t/how-to-display-sales-report-for-each-month/114775/2 "2007-09-17T22:40:53Z")

</div>

On Sep 16, 2007, at 9:26 PM, Joen wrote:

> Means that, user can select the start date and end date that they want  
> to view. Then they will see the list of sales based on month. I’ve  
> been doing this part for about 2 weeks but still can’t finish it.  
> Anybody that can help me with this?

What part is giving you trouble? There are several things you have to  
do:

1. Create a way for the user to specify the date range
2. Do a find with conditions
3. Summarize that array
4. Present it

---

<div class="post-metadata">

**Author:** ![Joen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/47e85d/32.png) [@Joen](https://www.ruby-forum.com/u/Joen)\
**Post date:** [September 18, 2007, 5:05am UTC](https://www.ruby-forum.com/t/how-to-display-sales-report-for-each-month/114775/3 "2007-09-18T05:05:02Z")

</div>

you might also want to use some graphs for presentation…

[http://nubyonrails.com/pages/gruff](http://nubyonrails.com/pages/gruff)
