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

Before I buy ...

edited October 2003 in General
(D5/D7) I am working with the trial ent version (v6?) on a master-detail
report.
I am using INFOpower's TwwQuery's to pull the data. q1 pulls the master
recs and I have an onScroll event to pull the corresponding detail recs into
q2. Problem is the only recs reported in q2 (and therefore the subreport)
are those contained in the sql script I entered in design mode. The
onscroll is definitely triggered - so I guess I don't understand how I am
supposed to get the detail recs in this scenario. I checked the tutorials
but could only see use of TTables and MasterSource properties. I need to
use a query.

Second question is what do I have to do to make the subreport a "drill down"
type instead of appearing on the report automatically?

tia

Comments

  • edited October 2003
    I also use InfoPower (3000) along with Report Builder 6 with Delphi 6.
    Report Builder is the way to go! While this is not really a report builder
    issue itself, I'll explain the steps you should take:
    Get rid of the onscroll event in the master query and note the primary key's
    field name, for example:
    select primary_key, field1, field2, * from master_table where ...
    Change the detail query to a parameterized query (assuming your SQL engine
    supports it). It is important to name your parameter the exact same as the
    primary key in the master query:
    select * from detail_table where parent_key = :primary_key
    On the detail query set the DataSource to be the **master query's**
    TDataSource component. The will now automatically get the detail query each
    time the header scrolls. This is a feature of Delphi's TQuery also.
    now hook up the report builder dbpipelines to each datasource and to the
    report as in their tutorials

    Jim C.

  • edited October 2003
    Hi Sydney,

    To answer your second question, every subreport can be made drill down by
    simply setting the TppSubReport.DrillDownComponent property to the component
    you would like to click to expand the subreport. This is a published
    property and can be accessed in the Object Inspector, in code, or by simply
    right clicking over your subreport component and selecting "Drill Down" from
    the popup menu.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited November 2003
    Jim,
    Thanks for the explanation. For the future, where would I find this info in
    the manual?
    I have made the purchase (Pro) but don't know my way around the helps/manual
    well enough yet apparently.

  • edited November 2003
    In Delphi's help, look up TQuery.DataSource for an explanation of how
    automatic master detail can work. TwwQuery descends from TQuery. This is
    also covered in the Report Builder Developer's guide under Report Tutorials:
    Master->Detail Report (p. 241 on my copy of the PDF).

    While we're on the subject of InfoPower working with Report Builder, check
    out the tech tip section on RichText which has a couple articles about using
    the InfoPower richtext stuff combined with Report Builder. It gives some
    nice capabilities to your reports, such as users dragging an image into a
    richtext and printing that out as part of a report.

    Jim

This discussion has been closed.