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

How do you assign a TppReport to a variable of TppReport

edited January 2004 in General
I'm using D6 Enterprise with SP2 and ReportBuilder Proffesional 6.0. I have
a class object that has FReport field of TppReport. I want to assign a
TppReport based on the Reports name something like:

============================================================================
==
MyClassObject.Report:=frmRptParams.FindChildControl(MyClassObject.ReportName
) as TppReport;
============================================================================
==

The problem is that the TppReport parent is not the form so this code will
not work.

Does anyone have a suggestion or tip. I would really appreciate it.

Thanks,
Bill N

Comments

  • edited January 2004
    I forgot to add that I only have the reports name as string but from that
    string I want to assign the corresponding TppReport. However, I cannot
    figure out a way to assign a TppReport to a variable of TppReport by just
    knowing the report's name.

    Any help would be appreciated.

    Thanks,
    Bill N

  • edited January 2004
    Hi Bill,

    Instead of using the FindChildControl, you will want to use the
    FindComponent method. This method will find the given component by name
    inside it's owner... ie. the form.

    --
    Best Regards,

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