|
Re: Dependant entities in the same report table [message #844032 is a reply to message #843777] |
Fri, 13 April 2012 16:06 |
|
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 |
|
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 #846979 is a reply to message #846569] |
Mon, 16 April 2012 23:13 |
|
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.
|
|
|
|
Powered by
FUDForum. Page generated in 0.04127 seconds