Home Subreports
New Blog Posts: Merging Reports - Part 1 and Part 2

Subreport not displaying

edited November 2002 in Subreports
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.

Comments

  • edited November 2002
    SkipWhenNoRecords should be set to False on the detail datapipeline.

    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

  • edited November 2002
    SkipWhenNoRecords is set to false in the detail pipeline.

    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.


  • edited November 2002
    Two grids: one for the master and one for the detail. If the detail dataset
    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

  • edited November 2002
    Thanks, Jim. In duplicating the problem using Northwinds, I saw what I was
    doing wrong.


This discussion has been closed.