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

how do i find a TppComponent inside a Loaded report based on the Username of the component

edited August 2004 in General
hi,
in a datamodule where i have a predefined report (with all components and
all usernames set)
i load a template from a stream cause sometimes the layout is changed and i
want to load the altered template
but i need to set some text into some memo components
as long as i don't loadfromstream all goes well since the original
components aren't destroyed i guess (i looked at the component name)
so i figured i needed to look at the username of the component so now i'm
looking into the report to find the component based on its username
something like this

for liBand := 0 to aReport.BandCount-1 do
begin
for liObject := 0 to aReport.Bands[liBand].ObjectCount-1 do
begin
lObject := aReport.Bands[liBand].Objects[liObject];

if lObject.UserName = aUsername then

but for some reason the username isn't retained from the altered layout?

is there a way to identify a component from a streamed in report?

tia,
marc

Comments

  • edited August 2004
    Never mind...

    i was loading an old template without the changed usernames
    pretty obvious that the component wasn't found

    cu
    marc


This discussion has been closed.