|Detail records in Master-Detail report do not change [message #870617]
||Wed, 09 May 2012 01:25
| Jeff Stouse
Registered: May 2012
(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.)|
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:
And for each matter record there are a different number of detail records:
Matter No Note records
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.