how do i find a TppComponent inside a Loaded report based on the Username of the component
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
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
This discussion has been closed.
Comments
i was loading an old template without the changed usernames
pretty obvious that the component wasn't found
cu
marc