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

FindUserObjectInComponent problem

edited October 2003 in General
Hi,
I can't get FindUserObjectInComponent to work as expected.

E.g. if I call (after creating a simple report):

ppReport1.FindUserObjectInComponent(ppDBText1.Username,
ppReport1.DetailBand) it returns nil.


Maybe I misunderstood, but isn't this function supposed to return the
component with a username that exists in particular band on the report?


I am using RB 703, Delphi 7 on XP.

Thanks.
Morten

Comments

  • edited October 2003
    Hi Morten,

    The FindUserObjectInComponent method is primarily used as an internal
    function. You are however welcome to try to get it to work with your
    application. The problem I see is that you are passing the DetailBand
    object as the owner of the DBText. The band are not the owner of the report
    components, they are only the parent objects. You will need to pass the
    form object to get a correct output.

    As an alternative you could create a report object loop to find certain
    objects in a report. Check out the Tech-Tips newsgroup in the CodeBased
    thread for more information on looping through report objects.

    --
    Best Regards,

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