Home Subreports

HELP !!!!! Using master-detail with temperary datasets

edited February 2003 in Subreports
Hi All,


I'm desperate (after 6 hours "playing" with RB...)
I'm working with RB 6, D6 and Informix as DB. My problem is as follow: In
informix there is an option to create temporary tables. Those table are seen
only within the session that created then. At the at of the process of
getting the data from the database I have two temporary tables, and my
question is how do I connect them at runtime ? I couldn't do it at
design-time, because that in that stage they are not exist, yet, and I
couldn't update the "MasterFieldLinks" property to add new link.....

PLEASE HELP...........


Ofer Buhnik

Comments

  • edited February 2003
    ---------------------------------------------------------
    Tech Tip: Define Master/Detail DataPipeline Links in Code
    ---------------------------------------------------------

    Defining a Master/Detail relationship for a DataPipeline
    requires that the detail pipeline have the
    following properties defined:

    1. MasterDataPipeline

    2. MasterFieldLinks


    At Delphi design-time you can use the object inspector
    and the DataPipeline's FieldLinks editor to define
    the master/detail relationship.


    The following example illustrates how to define the
    master/detail relationship dynamically at run-time.


    var
    lFieldLink: TppMasterFieldLink;


    begin

    {define the master/detail pipeline relationship}
    plDetail.MasterDataPipeline := plMaster;

    {create a new field link }
    lFieldLink := TppMasterFieldLink.Create(nil);

    lFieldLink.Parent := plDetail;

    {assign the detail field name}
    lFieldLink.DetailFieldName := 'CustNo';

    {assign the master field name}
    lFieldLink.MasterFieldName := 'CustNo';


    end;


    Note: The DataPipeline linking requires the records in the detail dataset to
    be ordered by the linking fields. In the above example, the detail data must
    be ordered by CustNo.

    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.