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

Drill Down Subreport Problem

edited January 2003 in Subreports
I have a huge selection of reports that are part of a product my company
recently purchased. I don't know what version of ReportBuilder they were
originally written in but we are now using version 7. The report I'm having
problems with has a drill-down subreport that shows additional information
about each detail line. The report works except when I drill-down. Then I
see the drill-down information for the first detail for all drill-downs. The
OpenDataSet event is only firing once. It seems to me it should fire every
time a new drill-down is opened.

Users have a huge amount of freedom to specify the filters and sort orders
for this report. The SQL is generated for the queries that retrieve the data
so a master/detail setup is not possible. What am I missing here? I'm new to
ReportBuilder but I'm begining to get the hang of it. Assuming I have the
correct source I can't imagine how this report every worked. Any ideas?

Craig Jensen
PowerQuest Corporation

Comments

  • edited January 2003
    RB provides the capability to not fire detail querys for every master
    record. This is very slow and this is how Delphi implements parameter query
    linking. Is this a DADE report (Data Access Development Environment or
    commonly known as the Data tab in the designer). If so, DADE creates a
    special detail query such that it contains all records for all masters in
    the report, ordered carefully. The order is important because the report
    engine can traverse the detail dataset in order. When the key linking value
    changes in the detail dataset, then the report engine knows that it can
    begin printing the next set of detail records for the next master record.
    This is much faster than Delphi query linking.

    The drill down behavior you describe sounds like a custom drill down. Are
    there any event handlers associated with this report? By default it should
    drill down only the subreport that you've selected. I remember in the past
    that we worked on helping a few customers implement alternative drill down
    behaviors, such as toggling expand all capabilities. Compare the output of
    the main reports demo #152 which implements DrillDown using our native
    inplementation to this report you have inherited.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited January 2003
    That sheds much light on the behavior I was seeing. I think I know how to
    proceed at this point. For some reason the code was attempting to just query
    the data for the related master record. This actually makes the code
    simpler. Thanks for the help.

    Craig Jensen

  • edited January 2003
    This is not a DADE report. It uses two TppJITPipelines to try and do query
    parameter linking. The timing of ReportBuilders events must have changed and
    now the report no longer works. Is it even possible to do query parameter
    linking with ReportBuilder? I've seen some of your tutorials and they use
    master/detail linked tables. My SQL is dynamically generated and the detail
    query needs to know the value of the linking field. Can this be setup in
    ReqortBuilder?

    Craig Jensen

  • edited January 2003
    Yes, you can use Delphi parameter linking on queries, although it is very
    slow. Here is an example which sets the parameters manually as an
    alternative:

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


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited January 2003
    This is a good example but remember I'm talking about a drill down report.
    Isn't there any way to query the data when the drill down is expaned? Why
    isn't there an OnDrillDown or OnExpand event?

    Craig

  • edited March 2003

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.