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

Master detail not working

edited September 2002 in Subreports
Using D5, RB 5.55, SQL Server 2000.

Master - Detail report.

Two TADOQuery, Two TDataSource, Two DBPipeline. Everything connected.
Detail DBPipeline linked to master DBPipeline via MasterdataPipline and
Master field Links.

The TppReport datapipeline linked to MasterdataPipeline.

The subreport datapipeline linked to detail pipeline.

Two queries tested in QA in SQL server. They return data as expected.

Master data works, Detail data; I get nothing.

Tried all settings on the following:

SkipWhenNoRecords
PrintBehavior
TraverseAllData

First sign of trouble: When I drop a TppDBText on the detail band in the
subreport I don't see the fieldname within the component on the form nor do
I see the data. However if I break the link of the pipelines I do see the
detail field name and data, however, the detail part of the report still
doesn't work

I've successfully created several of these type of reports and they worked.

Why can't I do it now???

Thanks,
Joe

Comments

  • edited September 2002
    Yes.

  • edited September 2002
    Is the detail query ordered by the key linking field and master ordering?
    This is the only way that it will work.

    Here is an example (uses paradox for demo purposes) that shows what the
    linking SQL should look like and also an explanation.

    http://www.digital-metaphors.com/tips/MagicMasterDetail.zip

    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited September 2002
    Are the field objects correctly defined on the detail data pipeline? You
    can toggle the autocreate property on the datapipeline to rercreate the
    field objects based on the fields in the dataset. If that doesn't work to
    recreate the fields, then try deleting the data pipeline and recreating it.
    This will definitely force the detail datapipeline to recreate the fields.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited September 2002
    Found the problem along your suggestion.

    The detail query I have itself has a left outer join. The link field I
    specified in the pipeline was the field from the table that was being joined
    as opposed to being from the table on the left. Anyway when I tried the
    main field the report worked. So the fix was in my SQL and not in any of
    the RB stuff.

    Thanks,
    Joe


This discussion has been closed.