Not understanding master / detail relationships.
New ReportBuilder developer here. I LOVE this product.
Unfortunately, I am having some failure in my understanding of master/detail
relationships as they relate to ReportBuilder.
I have two datasets. The first is a DBISAMQuery returning 250 records. The
second is a DBISAMTable, linked to the query. The table contains special
instructions for the master records and is sparsely populated, only 5 of the
master records in the query will find a corresponding detail record in the
table. Both datasets have datasources and datapipelines.
My report is based on the DBISAMQuery and contains no grouping, relying on
the query to provide sort order.
When my report uses only fields from the DBISAMQuery all is well. I see all
250 records in the generated report.
As soon as I add a field from the DBISAMTable, my report prints only the 5
records from the master table that have matching detail records. The format
is correct, only 245 records have gone missing.
When I remove the field from the report, all records print again, but (of
course) I can't see that note field from the detail table.
I am not changing anything else in the report. The datapipeline for the
report remains the one attached to the master query in both cases.
What I THINK should happen is that in both cases the report should traverse
all 250 records in the dataset attached to the master dataset. With a
detail field placed on the report, that field should be empty for the 245
master records without details, and present for the 5 master records that
have matching details.
Can anyone suggest where my mistake is?
--
Larry Lustig
Unfortunately, I am having some failure in my understanding of master/detail
relationships as they relate to ReportBuilder.
I have two datasets. The first is a DBISAMQuery returning 250 records. The
second is a DBISAMTable, linked to the query. The table contains special
instructions for the master records and is sparsely populated, only 5 of the
master records in the query will find a corresponding detail record in the
table. Both datasets have datasources and datapipelines.
My report is based on the DBISAMQuery and contains no grouping, relying on
the query to provide sort order.
When my report uses only fields from the DBISAMQuery all is well. I see all
250 records in the generated report.
As soon as I add a field from the DBISAMTable, my report prints only the 5
records from the master table that have matching detail records. The format
is correct, only 245 records have gone missing.
When I remove the field from the report, all records print again, but (of
course) I can't see that note field from the detail table.
I am not changing anything else in the report. The datapipeline for the
report remains the one attached to the master query in both cases.
What I THINK should happen is that in both cases the report should traverse
all 250 records in the dataset attached to the master dataset. With a
detail field placed on the report, that field should be empty for the 245
master records without details, and present for the 5 master records that
have matching details.
Can anyone suggest where my mistake is?
--
Larry Lustig
This discussion has been closed.
Comments
Thanks for the kind remarks.
By default the Datapipeline will skip any master records that do not have
corresponding details. If you would like to override this behavior, you can
simply set the SkipWhenNoRecords property of the detail pipeline to False.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
--
Larry