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

Finding Report Components

edited June 2003 in General
Forgive me if this has been answered elsewhere in this newsgroup, couldn't
find a thread on it.

I need to find all components that are on a specific report. For instance,
I might have 10 TppDBText components on one report, 6 on another. The
TppDBText components on the first report may have a Tag of 1 where as the
second report's TppDBText components may have a Tag of 2.

What I need to do is modify the DisplayFormat of all of the TppDBText
components with a Tag of a certain number to a specific string. The
OnFormat event doesn't work for what I am trying to do (export to Excel with
Pragnaan's components), so I need to do it this way.

Any ideas are most appreciated!

Thanks in advance...

Comments

  • edited June 2003
    u can find components by tag using this code

    for intCounter := 0 to ComponentCount - 1 do
    begin
    if (Components[intCounter] is TppDBText) and
    (TppDBText(Components[intCounter]).Tag in [intTag])then
    //do something
    end



  • edited June 2003
    Hi Thom,

    You can access the components of a report using a Report Object Loop.
    Please see the Tech-Tips newsgroup
    (digital-metaphors.public.reportbuilder.tech-tips) in the Code Based thread
    for an example. (Loop thru all objects in a report).

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2003
    Thanks Nico!

  • edited June 2003
    Thanks for the tip, but there might be two or three different tags on the
    reports, and with 30 reports that'd be too much to manage programmatically.
    Appreciate the reply!

    Take care...

This discussion has been closed.