Subreport not displaying
I am using D7 and RB7. My report uses 2 TADOQueries that are both ordered
by the same field. The two pipeline components are set up in a
master-detail relationship with the field used to order the queries linking
them. When I set the 'SkipWhenNoRecords' property of the detail pipeline to
false, the subreport is not displayed but all of the master records are
displayed. When this property is set to true, only the master records with
corresponding detail records are shown, along with the appropriate
subreport. The master records without detail records are not displayed. I
would like all of the master records displayed if there are detail records
or not, and when there are detail records, I would like them displayed as
well. Any idea what I am missing? Thanks.
by the same field. The two pipeline components are set up in a
master-detail relationship with the field used to order the queries linking
them. When I set the 'SkipWhenNoRecords' property of the detail pipeline to
false, the subreport is not displayed but all of the master records are
displayed. When this property is set to true, only the master records with
corresponding detail records are shown, along with the appropriate
subreport. The master records without detail records are not displayed. I
would like all of the master records displayed if there are detail records
or not, and when there are detail records, I would like them displayed as
well. Any idea what I am missing? Thanks.
This discussion has been closed.
Comments
Are the queries parameterized? If not, then are they ordered correctly as
you've examined the dataset in a TDBGrid on a form? Verify that the records
are correctly ordered in the detail so that they can be traversed as the
masters are traversed in order by the report engine.
You've set the detail datapipeline's MasterFieldLinks and MasterDatapipeline
property?
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
The queries aren't parameterized, but they both query for the same date and
are ordered with the same clause. I want to make sure that I understand you
correctly when you ask if I have examined the dataset in a grid - I have
looked at both datasets in two separate grids. Is that what you expect?
Or, are the two queries supposed to be linked somehow to produce one dataset
that can be looked at in one grid? If the two grids is correct, the
ordering looks right. The first record in the master recordset has two
corresponding detail records. Then several master records do not have a
corresponding detail record. Then one does, etc. Perhaps I am not
accessing the data properly? Thanks for your help.
is ordered by the master then it should work if you have all the detail
records in one query. The MasterDataPipeline and MasterFieldLink properties
should be set on the detail pipeline. If you could reproduce this with the
Northwinds database in SQL Server (or any sample database for ADO) then send
it to support@digital-metaphors.com
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
doing wrong.