Home » Archived » BIRT » Detail records in Master-Detail report do not change(Detail records in Master-Detail report do not change when Master Record does)
Detail records in Master-Detail report do not change [message #870617] |
Wed, 09 May 2012 01:25  |
Eclipse User |
|
|
|
(I posted this in the Newcomers section, but no answers - as a first-timer, I think it belongs better in this forum- please forgive the cross-posting.)
Eclipse 3.6.2
The purpose of the report is to list all matters that are in litigation, and any associated note records for each matter.
I inserted a Grid and then inserted master record fields from my first data set - using a query from the Matter table.
Then, I inserted a table in one of the detail rows of the same Grid. (to hold the detail Note records.)
In that table, I inserted one field (memo field) from the detail records coming from the second data set - a query from the Notes table. In that query, I used a ? in the Where clause to be used to link to the key field in the Matter table (the key field in both tables - Matter and Notes - is the Matno (MatterNumber) field.)
I then created a DSP parameter (Data Set Parameter)on the Detail table - and provided a default value ('2012-101') to test the query. The query returns the appropriate number of detail records for whatever default value I provide the parameter.
I then bound the DSP_MatNo parameter to the MatNo row in the Available Column Bindings (Matter table) -
the expression is: row["MatNo"].
Now, when I preview the report, I see the correct Matter records. There are the correct number of Notes (detail) records under each Matter (Master) records, but the detail records are always the first detail record, and then that same detail record is repeated as many times as there are detail (Notes) records for each Matter record.
For example, if there are four matter records:
Matter No
2012-097
2012-098
2012-099
2012-101
And for each matter record there are a different number of detail records:
Matter No Note records
2012-097 1
2012-098 2
2012-099 2
2012-101 4
Then those same number of note record memos will appear-but if there is more than one record, the same memo is repeated the correct number of times.
So, the link between the two tables has to be working - to some degree - but I cannot get the correct detail records to be displayed.
I'm sure this is something stupidly simple, but I cannot figure it out.
Please help.
Thanks,
|
|
|
Re: Detail records in Master-Detail report do not change [message #870809 is a reply to message #870617] |
Wed, 09 May 2012 14:33   |
Eclipse User |
|
|
|
Jeff,
Can you post the report? BTW is the outer table a table item or a grid
item?
Jason
On 5/9/2012 1:26 AM, Jeff Stouse wrote:
> (I posted this in the Newcomers section, but no answers - as a
> first-timer, I think it belongs better in this forum- please forgive the
> cross-posting.)
>
> Eclipse 3.6.2
>
> The purpose of the report is to list all matters that are in litigation,
> and any associated note records for each matter.
>
> I inserted a Grid and then inserted master record fields from my first
> data set - using a query from the Matter table.
>
> Then, I inserted a table in one of the detail rows of the same Grid. (to
> hold the detail Note records.)
>
> In that table, I inserted one field (memo field) from the detail records
> coming from the second data set - a query from the Notes table. In that
> query, I used a ? in the Where clause to be used to link to the key
> field in the Matter table (the key field in both tables - Matter and
> Notes - is the Matno (MatterNumber) field.)
>
> I then created a DSP parameter (Data Set Parameter)on the Detail table -
> and provided a default value ('2012-101') to test the query. The query
> returns the appropriate number of detail records for whatever default
> value I provide the parameter.
>
> I then bound the DSP_MatNo parameter to the MatNo row in the Available
> Column Bindings (Matter table) - the expression is: row["MatNo"].
>
> Now, when I preview the report, I see the correct Matter records. There
> are the correct number of Notes (detail) records under each Matter
> (Master) records, but the detail records are always the first detail
> record, and then that same detail record is repeated as many times as
> there are detail (Notes) records for each Matter record.
> For example, if there are four matter records:
>
> Matter No
> 2012-097
> 2012-098
> 2012-099
> 2012-101
>
> And for each matter record there are a different number of detail records:
>
> Matter No Note records
> 2012-097 1
> 2012-098 2
> 2012-099 2 2012-101 4
> Then those same number of note record memos will appear-but if there is
> more than one record, the same memo is repeated the correct number of
> times.
>
> So, the link between the two tables has to be working - to some degree -
> but I cannot get the correct detail records to be displayed.
>
> I'm sure this is something stupidly simple, but I cannot figure it out.
>
> Please help.
>
> Thanks,
>
>
>
>
>
|
|
| | | | | |
Re: Detail records in Master-Detail report do not change [message #871249 is a reply to message #871097] |
Fri, 11 May 2012 12:06  |
Eclipse User |
|
|
|
Grid should work to. I think the issue is that it is in the footer of
the list. Look at the attached example.
Jason
On 5/10/2012 4:20 PM, Jeff Stouse wrote:
> When I make a copy and delete everything from the page and then drag the master table to the layout screen, I get a table. My original report is based on a grid. the Report works when I drag the detail table into the second column, but not in my original report when I have a grid.
>
> I was following the Field Guide (I purchased the book) on setting up the master-detail type of report - so it doesn't work if you use a grid -but does if you use two tables (one for the master and one for the detail)?
>
> So I should re-create this using the two-table approach, with the master table having the detail table in one of its detail rows?
>
> I've uploaded two screen shots of my original report:
>
> 1 - No detail rows in grid
> 2 - Displaying detail rows in grid
>
> According to those views - my detail table is in the detail rows of the grid.
>
> Still confused, but I think I have a way to fix this - just re-create using two tables - right?
>
> Thanks,
|
|
|
Re: Detail records in Master-Detail report do not change [message #871250 is a reply to message #871097] |
Fri, 11 May 2012 12:06  |
Eclipse User |
|
|
|
Grid should work to. I think the issue is that it is in the footer of
the list. Look at the attached example.
Jason
On 5/10/2012 4:20 PM, Jeff Stouse wrote:
> When I make a copy and delete everything from the page and then drag the master table to the layout screen, I get a table. My original report is based on a grid. the Report works when I drag the detail table into the second column, but not in my original report when I have a grid.
>
> I was following the Field Guide (I purchased the book) on setting up the master-detail type of report - so it doesn't work if you use a grid -but does if you use two tables (one for the master and one for the detail)?
>
> So I should re-create this using the two-table approach, with the master table having the detail table in one of its detail rows?
>
> I've uploaded two screen shots of my original report:
>
> 1 - No detail rows in grid
> 2 - Displaying detail rows in grid
>
> According to those views - my detail table is in the detail rows of the grid.
>
> Still confused, but I think I have a way to fix this - just re-create using two tables - right?
>
> Thanks,
|
|
|
Goto Forum:
Current Time: Tue May 13 00:01:58 EDT 2025
Powered by FUDForum. Page generated in 0.02885 seconds
|