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

Master/Detail with JIT

edited August 2003 in General
Hi,

I've checked the master/detail demo - however, I cannot find
out how to use/create a decent master/detail report with the
JIT pipelines that need to traverse over multiple object structures.

That is, how and when do I control what is the current master
record and how many detail records the subreport has?

--

With regards,

Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions
http://www.upscene.com

Comments

  • edited August 2003
    Hi Martijn,

    You were a bit unclear about which demo you had taken a look at. Have you
    seen Demo 139? This demo shows how to create a master-detail style report
    using JITPipelines. I am also unclear about how you want to control which
    Master is the current one. ReportBuilder will traverse all Masters and all
    Detail fields pertaining to it based on how the master and detail pipelines
    are linked.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited August 2003
    Hi Nico,


    I'm sorry - it was already quite late when I wrote that.


    Yes, 139 ... but...


    On each "next row" of the master, I need to select a different (detail) source
    and
    recordcount my detail rows. I cannot find this in Demo 0139 - if it is in there,
    please explain where and how.

    I need to set a new recordcount for the detail rows after the master pipeline
    goes to the next record.

    Any ideas?


    --

    With regards,

    Martijn Tonies
    Database Workbench - the developer tool for InterBase & Firebird
    Upscene Productions
    http://www.upscene.com
  • edited August 2003
    Hi Martijn,

    The reason demo 139 works is that the datapipelines are linked so when the
    master record changes, the detail records change automatically. This then
    requires no need to change the detail source or record count. If you would
    still need to do this manually, check out the OnMasterRecordChange event and
    use that to change your detail information.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited August 2003
    Nico,


    But from what I understand from Demo 0139, is that all the detail data is
    available at report startup, and filtered/positioned during reporting, right?


    In my case, the amount of detail data is available whenever the master row
    changes, but I cannot figure out how?


    --

    With regards,

    Martijn Tonies
    Database Workbench - the developer tool for InterBase & Firebird
    Upscene Productions
    http://www.upscene.com
  • edited August 2003
    Hi Martijn,

    From what I understand, you need to change the detail datasource depending
    on which master you are currently accessing. This is not how a
    Master-Detail relationship is defined in the Report Engine. Your best bet
    as I mentioned before is to try to use the OnMasterRecordChange and try to
    feed the Report the correct data every time the master record changes.
    Another alternative you may want to explore is using an in-memory dataset
    such as kbmMW (www.components4developers.com), rather than a JIT Pipeline.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited August 2003
    Hi Nico,


    Not really the datasource, but only its data.


    What does ReportBuilder expect? One large chunk of detail data that gets
    filtered by a master value?

    Can I "open" and "close" a detail in order to get a different detail
    recordcount?


    If RB expects one large chunk of detail data, doesn't it fetch way too much
    data from real datasets? Or is a master WHERE clause applied to the detail
    as well? (just asking)


    --

    With regards,

    Martijn Tonies
    Database Workbench - the developer tool for InterBase & Firebird
    Upscene Productions
    http://www.upscene.com
  • edited August 2003
    Hi Martijn,

    ReportBuilder will traverse the entire Master and Detail datasets unless
    they are filtered in any way either using an SQL query or Delphi Table
    Filtering. The only way the Report Engine knows which Detail records apply
    to a given Master record is through the datapipeline or table linking done
    before the engine starts. I am still a bit unclear about the results you
    are trying to get. Do you want to limit the number Detail records that the
    Report Engine traverses or do you want to filter out certain records for
    each Master record? If the datasets are linked, the Master 'where' clause
    will not affect the number of Detail records per Master record, but it will
    affect the number of Detail records total.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited August 2003
    Hi Nico,


    Right - I stopped using Master/Detail - it doesn't make sense for what
    I'm trying to do...

    Thanks for the explanation - once I figured this out, it was pretty easy
    to solve my problems.


    --

    With regards,

    Martijn Tonies
    Database Workbench - the developer tool for InterBase & Firebird
    Upscene Productions
    http://www.upscene.com
  • edited August 2003
    Glad to help :).

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.