Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Dependant entities in the same report table
Dependant entities in the same report table [message #843777] Fri, 13 April 2012 11:04 Go to next message
Amin Abu-Taleb is currently offline Amin Abu-TalebFriend
Messages: 4
Registered: April 2012
Junior Member
Hi, i'm noob using BIRT and I'd like to do a simple report but i'm not able to figure it out.
I've two dependant entities, A which has many B objects in another database table.
What's the best way to do it, if I want a list of A elements and, in the same table, in the last column, a list of B elements of A separated by comma?.

Thanks in advance.
Re: Dependant entities in the same report table [message #844032 is a reply to message #843777] Fri, 13 April 2012 16:06 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

I would do this with two datasets. One that gets all of the A values
and then one that returns all B object for a specific A value ie

select B from mytable where A = ?

I would then put a table in that is bound to A and list all As. Add a
column to the right and put in the 'B' table in the new column. In the
new table I would delete the table header and detail row. Only use the
table footer. Add an aggregation element that uses the Concatenate
function. Supply the B value as the expression and the separator as
",". Make sure to click on the bindings tab for the nested table to set
the values of the dataset parameter ie the ? in the B query.

I built a sample of this approach and it is attached.

You can also see this video.
http://www.eclipse.org/birt/phoenix/examples/reports/birt2.1/subreport/index.php

Jason

On 4/13/2012 7:04 AM, Amin Abu-Taleb wrote:
> Hi, i'm noob using BIRT and I'd like to do a simple report but i'm not
> able to figure it out. I've two dependant entities, A which has many B
> objects in another database table.
> What's the best way to do it, if I want a list of A elements and, in the
> same table, in the last column, a list of B elements of A separated by
> comma?.
> Thanks in advance.
Re: Dependant entities in the same report table [message #844038 is a reply to message #843777] Fri, 13 April 2012 16:06 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

I would do this with two datasets. One that gets all of the A values
and then one that returns all B object for a specific A value ie

select B from mytable where A = ?

I would then put a table in that is bound to A and list all As. Add a
column to the right and put in the 'B' table in the new column. In the
new table I would delete the table header and detail row. Only use the
table footer. Add an aggregation element that uses the Concatenate
function. Supply the B value as the expression and the separator as
",". Make sure to click on the bindings tab for the nested table to set
the values of the dataset parameter ie the ? in the B query.

I built a sample of this approach and it is attached.

You can also see this video.
http://www.eclipse.org/birt/phoenix/examples/reports/birt2.1/subreport/index.php

Jason

On 4/13/2012 7:04 AM, Amin Abu-Taleb wrote:
> Hi, i'm noob using BIRT and I'd like to do a simple report but i'm not
> able to figure it out. I've two dependant entities, A which has many B
> objects in another database table.
> What's the best way to do it, if I want a list of A elements and, in the
> same table, in the last column, a list of B elements of A separated by
> comma?.
> Thanks in advance.
Re: Dependant entities in the same report table [message #846147 is a reply to message #844038] Sun, 15 April 2012 20:26 Go to previous messageGo to next message
Amin Abu-Taleb is currently offline Amin Abu-TalebFriend
Messages: 4
Registered: April 2012
Junior Member
Thanks for you fast reply Jason, I'm gonna try it and I tell you.

Re: Dependant entities in the same report table [message #846569 is a reply to message #846147] Mon, 16 April 2012 07:18 Go to previous messageGo to next message
Amin Abu-Taleb is currently offline Amin Abu-TalebFriend
Messages: 4
Registered: April 2012
Junior Member
Hi,
I've tried it and it runs perfect on BIRT editor. But it shows nothing in the last column when I run it from my java project. Should I configure anything to show subreports?

Thanks again.
Re: Dependant entities in the same report table [message #846979 is a reply to message #846569] Mon, 16 April 2012 23:13 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Know they should show by default. Can you post your code?

Jason

On 4/16/2012 3:18 AM, Amin Abu-Taleb wrote:
> Hi, I've tried it and it runs perfect on BIRT editor. But it shows
> nothing in the last column when I run it from my java project. Should I
> configure anything to show subreports?
>
> Thanks again.
Re: Dependant entities in the same report table [message #847563 is a reply to message #846979] Tue, 17 April 2012 12:28 Go to previous message
Amin Abu-Taleb is currently offline Amin Abu-TalebFriend
Messages: 4
Registered: April 2012
Junior Member
Not necessary, it was my fault. Now it runs perfect!!
Thanks again.
Previous Topic:Y-axis scale
Next Topic:Birt Bar Interval Chart
Goto Forum:
  


Current Time: Thu Mar 28 17:56:14 GMT 2024

Powered by FUDForum. Page generated in 0.04127 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top