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

Subreport + AutoSearch issue

edited June 2002 in General
Hi there,

I have a simple report with a master->detail1->detail2 relationship. The
data pipeline of the report is detail1. In the detail band of the report
are the fields of detail1, plus a subreport of which the data pipeline is
the detail2 table. Everything works fine until I add an autosearch criteria
to the master table. Then the subreport does not print, even though in the
data tab of the RB designer the detail2 table shows the correct data in the
Data Preview page.

I have found I can get around this by:
- Joining the master and detail1 tables together
- Setting the pipeline of the report to be master1
- Creating a group based on the detail1 table's link field to the master
- Putting the detail1 fields in the group header
- The subreport for detail2 remains in the detail band.

However, this is a bit messy and it seems like an illogical way to do it,
especially as it is an end user solution and the end user may not expect to
see the detail1 fields in the master table dataset.

I am using ReportBuilder 6.01 with Delphi 6 connected to Interbase 6 tables
via Midas (daMidas).

Any help much appreciated.

Alan

Comments

  • edited June 2002
    I set up the project you described using Midas and was able to successfully
    run a master detail report with search criteria. First I want to make sure
    you are describing your setup correctly. Also I'm a little confused on
    whether you have one or two level of detail. Please clarify the setup of the
    report a bit further. Are there two pipelines (master->detail) and the
    report traverses the master and the subreport the detail? Also, does the
    subreport not print for any records at all once you add autosearch criteria,
    or for some of them?

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited July 2002
    Hi,

    There are three pipelines: the master (invoice table), detail1 (the invoice
    lines table) and detail2 (which is a detail table of the invoice lines). The
    report's datapipeline is the invoice lines table. In the detail band there
    is a subreport connected to the detail2 table. Once autosearch criteria is
    added to the master table, none of the subreport appears at all.

    P.S. the entire report was designed using the end user tool, and the report
    is stored in an Interbase table.

    Thanks, Alan

    "Alexander Kramnik (Digital Metaphors)" wrote
  • edited July 2002
    One thing to check is the actual SQL which is generated by Control-Clicking
    on the dataview to check the actual SQL which will be submitted. It is
    possible that an invalid SQL statement is being generated which is not
    retrieving any records.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

This discussion has been closed.