Finding Report Components
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...
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...
This discussion has been closed.
Comments
for intCounter := 0 to ComponentCount - 1 do
begin
if (Components[intCounter] is TppDBText) and
(TppDBText(Components[intCounter]).Tag in [intTag])then
//do something
end
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).
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
reports, and with 30 reports that'd be too much to manage programmatically.
Appreciate the reply!
Take care...