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

Setting MasterFieldLinks at run time (more than one field)

edited June 2010 in General
Back in 2004 this was shown for linking pipelins together.
What would the code look like for a relationship with more that one field?
Would it be something like: lFieldLink.DetailFieldName := 'CustNo;InvNo';

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;


--------------= Posted using GrabIt =----------------
------= Binary Usenet downloading made easy =---------
-= Get GrabIt for free from http://www.shemes.com/ =-

Comments

  • edited June 2010
    For two fields, you need to create two TppMasterFieldLinks.

    The detail data needs to be ordered by the linking fields, in the same order
    you define the masterfieldlinks.


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com



    Best regards,

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