# Master/detail report with Rails and Ireport/JasperReports

**URL:** <https://www.ruby-forum.com/t/master-detail-report-with-rails-and-ireport-jasperreports/178739>\
**Category:** Rails\
**Created:** [November 10, 2009, 1:57pm UTC](https://www.ruby-forum.com/t/master-detail-report-with-rails-and-ireport-jasperreports/178739 "2009-11-10T13:57:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rafaelrosafu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/59ef9b/32.png) [@rafaelrosafu](https://www.ruby-forum.com/u/rafaelrosafu)\
**Post date:** [November 10, 2009, 1:57pm UTC](https://www.ruby-forum.com/t/master-detail-report-with-rails-and-ireport-jasperreports/178739/1 "2009-11-10T13:57:10Z")

</div>

Hi all,  
has anyone made it already?

---

<div class="post-metadata">

**Author:** ![rafaelrosafu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/59ef9b/32.png) [@rafaelrosafu](https://www.ruby-forum.com/u/rafaelrosafu)\
**Post date:** [November 10, 2009, 10:15pm UTC](https://www.ruby-forum.com/t/master-detail-report-with-rails-and-ireport-jasperreports/178739/2 "2009-11-10T22:15:37Z")

</div>

Rafael,  
I and some other sad people I’ve met tried to make this a reality and  
wasted many weeks working through the gauntlet of half truths.  
It is totally a bogus lie that this can be done.  
David

On Nov 10, 4:57 am, Rafael R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![rafaelrosafu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/59ef9b/32.png) [@rafaelrosafu](https://www.ruby-forum.com/u/rafaelrosafu)\
**Post date:** [November 11, 2009, 1:57pm UTC](https://www.ruby-forum.com/t/master-detail-report-with-rails-and-ireport-jasperreports/178739/3 "2009-11-11T13:57:03Z")

</div>

David,thanks for your answer.  
My situation is the following:I have a table with various 1-n  
relationships,and I need to show all of this in a single report,is there  
some way to do this?

I’ve created a Java class(executed through my Jruby app) that  
successfully generates the “parent” report,but IÂ´m not figuring it out  
how to show its “childrens”.

Regards,  
Rafael R.

---

<div class="post-metadata">

**Author:** ![rafaelrosafu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/59ef9b/32.png) [@rafaelrosafu](https://www.ruby-forum.com/u/rafaelrosafu)\
**Post date:** [November 11, 2009, 8:08pm UTC](https://www.ruby-forum.com/t/master-detail-report-with-rails-and-ireport-jasperreports/178739/4 "2009-11-11T20:08:27Z")

</div>

Hi Davi,  
how could I contact you?

---

<div class="post-metadata">

**Author:** ![rafaelrosafu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/59ef9b/32.png) [@rafaelrosafu](https://www.ruby-forum.com/u/rafaelrosafu)\
**Post date:** [November 12, 2009, 12:33pm UTC](https://www.ruby-forum.com/t/master-detail-report-with-rails-and-ireport-jasperreports/178739/5 "2009-11-12T12:33:35Z")

</div>

On Nov 11, 7:57 am, Rafael R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> David,thanks for your answer.  
> My situation is the following:I have a table with various 1-n  
> relationships,and I need to show all of this in a single report,is there  
> some way to do this?
> 
> I’ve created a Java class(executed through my Jruby app) that  
> successfully generates the “parent” report,but I´m not figuring it out  
> how to show its “childrens”.

This really sounds like a JasperReports question and not really  
anything with Rails. To do a parent/child report in JR you need to  
have a sub-report for the children that the render process will  
populate with your collection of children. If you’re using iReport to  
build your report it’s pretty straight forward.

Mark

---

<div class="post-metadata">

**Author:** ![rafaelrosafu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/59ef9b/32.png) [@rafaelrosafu](https://www.ruby-forum.com/u/rafaelrosafu)\
**Post date:** [November 11, 2009, 3:45pm UTC](https://www.ruby-forum.com/t/master-detail-report-with-rails-and-ireport-jasperreports/178739/6 "2009-11-11T15:45:04Z")

</div>

Rafael,  
Sure. I use Ruport which is really cool and you’ll find many examples  
of this if you Google.  
I’d very much like to share information on JRuby if you’d contact me.  
David

On Nov 11, 4:57 am, Rafael R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![rafaelrosafu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/59ef9b/32.png) [@rafaelrosafu](https://www.ruby-forum.com/u/rafaelrosafu)\
**Post date:** [November 12, 2009, 5:28pm UTC](https://www.ruby-forum.com/t/master-detail-report-with-rails-and-ireport-jasperreports/178739/7 "2009-11-12T17:28:40Z")

</div>

Mark Menard wrote:

> On Nov 11, 7:57ï¿½am, Rafael R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> wrote:
> 
> > David,thanks for your answer.  
> > My situation is the following:I have a table with various 1-n  
> > relationships,and I need to show all of this in a single report,is there  
> > some way to do this?
> > 
> > I’ve created a Java class(executed through my Jruby app) that  
> > successfully generates the “parent” report,but Iï¿½m not figuring it out  
> > how to show its “childrens”.
> 
> This really sounds like a JasperReports question and not really  
> anything with Rails. To do a parent/child report in JR you need to  
> have a sub-report for the children that the render process will  
> populate with your collection of children. If you’re using iReport to  
> build your report it’s pretty straight forward.
> 
> Mark

It is cumbersome to render a subreport from Rails.So I just wondered if  
someone has already come up with another solution
