Monday, March 19, 2012

How to load images dinamically?

I want to show a different image on my header depending on some data on the
database, the path of the image could be on a table.
How can I do that?
--
LUIS ESTEBAN VALENCIA
MICROSOFT DCE 3.
MIEMBRO ACTIVO DE ALIANZADEV
http://spaces.msn.com/members/extremed/I would like to know this too. Rpt Designer allows you to use links for
images, but my question is similar. How can you change the value of the link?
"Luis Esteban Valencia" wrote:
> I want to show a different image on my header depending on some data on the
> database, the path of the image could be on a table.
> How can I do that?
> --
> LUIS ESTEBAN VALENCIA
> MICROSOFT DCE 3.
> MIEMBRO ACTIVO DE ALIANZADEV
> http://spaces.msn.com/members/extremed/
>
>|||Hi Luis,
I figured out a way to do it using Links. Create a textbox and point it to
link stored in the dB. Create an image and under the image properties, set
it's value to that textbox (e.g., =ReportItems.txtImageLink.Value).
HTH
"Luis Esteban Valencia" wrote:
> I want to show a different image on my header depending on some data on the
> database, the path of the image could be on a table.
> How can I do that?
> --
> LUIS ESTEBAN VALENCIA
> MICROSOFT DCE 3.
> MIEMBRO ACTIVO DE ALIANZADEV
> http://spaces.msn.com/members/extremed/
>
>|||Neo,
I tried what you suggested, but can't get it to work. I put
=ReportItems!txtPhotoLoc.Value in the Value property of the Image control.
The Source property is set to External. txtPhotoLoc is the name of a textbox
that has its value set to =Fields!PhotographLocation.Value.
Is this what you did? It doesn't work for me in either the preview or the
deployed version viewed through IE.
Is there something special about the "ReportItems" qualifier? I can't find
that object group anywhere in my project, but it doesn't complain about it
when I save and deploy it.
I checked and privileges are not a problem -- the content of
PhotographLocation it a fully qualified path to a URL you can paste in any
browser and get an image (e.g.,
http://msdn.microsoft.com/library/toolbar/3.0/images/banners/msdn_masthead_ltr.gif).
When I view source on the results in IE, the area that should show the
picture contains
<TD COLSPAN="5" class="a55"><IMG class="r1" src="http://pics.10026.com/?src="></TD></TR>
Why does SRC = ""?
-prophead
"Neo" wrote:
> Hi Luis,
> I figured out a way to do it using Links. Create a textbox and point it to
> link stored in the dB. Create an image and under the image properties, set
> it's value to that textbox (e.g., =ReportItems.txtImageLink.Value).
> HTH
> "Luis Esteban Valencia" wrote:
> > I want to show a different image on my header depending on some data on the
> > database, the path of the image could be on a table.
> > How can I do that?
> >
> > --
> > LUIS ESTEBAN VALENCIA
> > MICROSOFT DCE 3.
> > MIEMBRO ACTIVO DE ALIANZADEV
> > http://spaces.msn.com/members/extremed/
> >
> >
> >|||Prophead,
In my report, I have an image placed in the page header and the report text
is placed in the body. I set the image value =ReportItems!txtImageLink.Value.
What is the value of Fields.PhotgraphLocation.Value? It doesn't look like
the field is being properly filled in. It should be something like
"http://mysite/images/img.gif".
BTW - SRC is the property of the Img html tag. Since the field is not being
populated correctly, it will be "" or null.
"prophead" wrote:
> Neo,
> I tried what you suggested, but can't get it to work. I put
> =ReportItems!txtPhotoLoc.Value in the Value property of the Image control.
> The Source property is set to External. txtPhotoLoc is the name of a textbox
> that has its value set to =Fields!PhotographLocation.Value.
> Is this what you did? It doesn't work for me in either the preview or the
> deployed version viewed through IE.
> Is there something special about the "ReportItems" qualifier? I can't find
> that object group anywhere in my project, but it doesn't complain about it
> when I save and deploy it.
> I checked and privileges are not a problem -- the content of
> PhotographLocation it a fully qualified path to a URL you can paste in any
> browser and get an image (e.g.,
> http://msdn.microsoft.com/library/toolbar/3.0/images/banners/msdn_masthead_ltr.gif).
> When I view source on the results in IE, the area that should show the
> picture contains
> <TD COLSPAN="5" class="a55"><IMG class="r1" src="http://pics.10026.com/?src="></TD></TR>
> Why does SRC = ""?
> -prophead
> "Neo" wrote:
> > Hi Luis,
> >
> > I figured out a way to do it using Links. Create a textbox and point it to
> > link stored in the dB. Create an image and under the image properties, set
> > it's value to that textbox (e.g., =ReportItems.txtImageLink.Value).
> >
> > HTH
> >
> > "Luis Esteban Valencia" wrote:
> >
> > > I want to show a different image on my header depending on some data on the
> > > database, the path of the image could be on a table.
> > > How can I do that?
> > >
> > > --
> > > LUIS ESTEBAN VALENCIA
> > > MICROSOFT DCE 3.
> > > MIEMBRO ACTIVO DE ALIANZADEV
> > > http://spaces.msn.com/members/extremed/
> > >
> > >
> > >|||Thanks, Neo. Installing SP1 fixed the problem. Evidently there was a
problem when you set the source to "External" and the Value to a field from
the db with a URL. I also deleted the original report from the server and
re-deployed it, so that might have fixed it as well.
-prophead
"Neo" wrote:
> Prophead,
> In my report, I have an image placed in the page header and the report text
> is placed in the body. I set the image value => ReportItems!txtImageLink.Value.
> What is the value of Fields.PhotgraphLocation.Value? It doesn't look like
> the field is being properly filled in. It should be something like
> "http://mysite/images/img.gif".
> BTW - SRC is the property of the Img html tag. Since the field is not being
> populated correctly, it will be "" or null.
>
> "prophead" wrote:
> > Neo,
> >
> > I tried what you suggested, but can't get it to work. I put
> > =ReportItems!txtPhotoLoc.Value in the Value property of the Image control.
> > The Source property is set to External. txtPhotoLoc is the name of a textbox
> > that has its value set to =Fields!PhotographLocation.Value.
> >
> > Is this what you did? It doesn't work for me in either the preview or the
> > deployed version viewed through IE.
> >
> > Is there something special about the "ReportItems" qualifier? I can't find
> > that object group anywhere in my project, but it doesn't complain about it
> > when I save and deploy it.
> >
> > I checked and privileges are not a problem -- the content of
> > PhotographLocation it a fully qualified path to a URL you can paste in any
> > browser and get an image (e.g.,
> > http://msdn.microsoft.com/library/toolbar/3.0/images/banners/msdn_masthead_ltr.gif).
> >
> > When I view source on the results in IE, the area that should show the
> > picture contains
> > <TD COLSPAN="5" class="a55"><IMG class="r1" src="http://pics.10026.com/?src="></TD></TR>
> > Why does SRC = ""?
> >
> > -prophead
> >
> > "Neo" wrote:
> >
> > > Hi Luis,
> > >
> > > I figured out a way to do it using Links. Create a textbox and point it to
> > > link stored in the dB. Create an image and under the image properties, set
> > > it's value to that textbox (e.g., =ReportItems.txtImageLink.Value).
> > >
> > > HTH
> > >
> > > "Luis Esteban Valencia" wrote:
> > >
> > > > I want to show a different image on my header depending on some data on the
> > > > database, the path of the image could be on a table.
> > > > How can I do that?
> > > >
> > > > --
> > > > LUIS ESTEBAN VALENCIA
> > > > MICROSOFT DCE 3.
> > > > MIEMBRO ACTIVO DE ALIANZADEV
> > > > http://spaces.msn.com/members/extremed/
> > > >
> > > >
> > > >|||The SP1 readme explains why it "works" on SP1. It is something that was
specifically added to SP1:
http://download.microsoft.com/download/7/f/b/7fb1a251-13ad-404c-a034-10d79ddaa510/SP1Readme_EN.htm#_external_images
In particular, make sure you read the comment about configuring the
UnattendedExecutionAccount in the readme notes.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"prophead" <prophead@.discussions.microsoft.com> wrote in message
news:DC1075B2-4261-419D-9ABD-5ED96C5A0E2F@.microsoft.com...
> Thanks, Neo. Installing SP1 fixed the problem. Evidently there was a
> problem when you set the source to "External" and the Value to a field
> from
> the db with a URL. I also deleted the original report from the server and
> re-deployed it, so that might have fixed it as well.
> -prophead
> "Neo" wrote:
>> Prophead,
>> In my report, I have an image placed in the page header and the report
>> text
>> is placed in the body. I set the image value =>> ReportItems!txtImageLink.Value.
>> What is the value of Fields.PhotgraphLocation.Value? It doesn't look
>> like
>> the field is being properly filled in. It should be something like
>> "http://mysite/images/img.gif".
>> BTW - SRC is the property of the Img html tag. Since the field is not
>> being
>> populated correctly, it will be "" or null.
>>
>> "prophead" wrote:
>> > Neo,
>> >
>> > I tried what you suggested, but can't get it to work. I put
>> > =ReportItems!txtPhotoLoc.Value in the Value property of the Image
>> > control.
>> > The Source property is set to External. txtPhotoLoc is the name of a
>> > textbox
>> > that has its value set to =Fields!PhotographLocation.Value.
>> >
>> > Is this what you did? It doesn't work for me in either the preview or
>> > the
>> > deployed version viewed through IE.
>> >
>> > Is there something special about the "ReportItems" qualifier? I can't
>> > find
>> > that object group anywhere in my project, but it doesn't complain about
>> > it
>> > when I save and deploy it.
>> >
>> > I checked and privileges are not a problem -- the content of
>> > PhotographLocation it a fully qualified path to a URL you can paste in
>> > any
>> > browser and get an image (e.g.,
>> > http://msdn.microsoft.com/library/toolbar/3.0/images/banners/msdn_masthead_ltr.gif).
>> >
>> > When I view source on the results in IE, the area that should show the
>> > picture contains
>> > <TD COLSPAN="5" class="a55"><IMG class="r1" src="http://pics.10026.com/?src="></TD></TR>
>> > Why does SRC = ""?
>> >
>> > -prophead
>> >
>> > "Neo" wrote:
>> >
>> > > Hi Luis,
>> > >
>> > > I figured out a way to do it using Links. Create a textbox and point
>> > > it to
>> > > link stored in the dB. Create an image and under the image
>> > > properties, set
>> > > it's value to that textbox (e.g., =ReportItems.txtImageLink.Value).
>> > >
>> > > HTH
>> > >
>> > > "Luis Esteban Valencia" wrote:
>> > >
>> > > > I want to show a different image on my header depending on some
>> > > > data on the
>> > > > database, the path of the image could be on a table.
>> > > > How can I do that?
>> > > >
>> > > > --
>> > > > LUIS ESTEBAN VALENCIA
>> > > > MICROSOFT DCE 3.
>> > > > MIEMBRO ACTIVO DE ALIANZADEV
>> > > > http://spaces.msn.com/members/extremed/
>> > > >
>> > > >
>> > > >|||The notes on configuring the Unattended Execution Account are interesting,
and I can see how they would apply within a domain or intranet. Howeve, I
have a situation where my
customer is running a report on my Report Server and the photos to which the
URL's in the datafield point are on his/her secured server, which requires a
username and pwd to access?
Windows seems to store credentials for such access within user profiles
(e.g., get prompted for username and password when accessing a secure FTP
site and also get an opportunity to save the credentials). Can such
credentials be set once for the unattended report processing account for each
remote secured FTP/HTTP site that will contain photos that will be referenced?
-prophead
"Robert Bruckner [MSFT]" wrote:
> The SP1 readme explains why it "works" on SP1. It is something that was
> specifically added to SP1:
> http://download.microsoft.com/download/7/f/b/7fb1a251-13ad-404c-a034-10d79ddaa510/SP1Readme_EN.htm#_external_images
> In particular, make sure you read the comment about configuring the
> UnattendedExecutionAccount in the readme notes.
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "prophead" <prophead@.discussions.microsoft.com> wrote in message
> news:DC1075B2-4261-419D-9ABD-5ED96C5A0E2F@.microsoft.com...
> > Thanks, Neo. Installing SP1 fixed the problem. Evidently there was a
> > problem when you set the source to "External" and the Value to a field
> > from
> > the db with a URL. I also deleted the original report from the server and
> > re-deployed it, so that might have fixed it as well.
> >
> > -prophead
> >
> > "Neo" wrote:
> >
> >> Prophead,
> >>
> >> In my report, I have an image placed in the page header and the report
> >> text
> >> is placed in the body. I set the image value => >> ReportItems!txtImageLink.Value.
> >>
> >> What is the value of Fields.PhotgraphLocation.Value? It doesn't look
> >> like
> >> the field is being properly filled in. It should be something like
> >> "http://mysite/images/img.gif".
> >>
> >> BTW - SRC is the property of the Img html tag. Since the field is not
> >> being
> >> populated correctly, it will be "" or null.
> >>
> >>
> >> "prophead" wrote:
> >>
> >> > Neo,
> >> >
> >> > I tried what you suggested, but can't get it to work. I put
> >> > =ReportItems!txtPhotoLoc.Value in the Value property of the Image
> >> > control.
> >> > The Source property is set to External. txtPhotoLoc is the name of a
> >> > textbox
> >> > that has its value set to =Fields!PhotographLocation.Value.
> >> >
> >> > Is this what you did? It doesn't work for me in either the preview or
> >> > the
> >> > deployed version viewed through IE.
> >> >
> >> > Is there something special about the "ReportItems" qualifier? I can't
> >> > find
> >> > that object group anywhere in my project, but it doesn't complain about
> >> > it
> >> > when I save and deploy it.
> >> >
> >> > I checked and privileges are not a problem -- the content of
> >> > PhotographLocation it a fully qualified path to a URL you can paste in
> >> > any
> >> > browser and get an image (e.g.,
> >> > http://msdn.microsoft.com/library/toolbar/3.0/images/banners/msdn_masthead_ltr.gif).
> >> >
> >> > When I view source on the results in IE, the area that should show the
> >> > picture contains
> >> > <TD COLSPAN="5" class="a55"><IMG class="r1" src="http://pics.10026.com/?src="></TD></TR>
> >> > Why does SRC = ""?
> >> >
> >> > -prophead
> >> >
> >> > "Neo" wrote:
> >> >
> >> > > Hi Luis,
> >> > >
> >> > > I figured out a way to do it using Links. Create a textbox and point
> >> > > it to
> >> > > link stored in the dB. Create an image and under the image
> >> > > properties, set
> >> > > it's value to that textbox (e.g., =ReportItems.txtImageLink.Value).
> >> > >
> >> > > HTH
> >> > >
> >> > > "Luis Esteban Valencia" wrote:
> >> > >
> >> > > > I want to show a different image on my header depending on some
> >> > > > data on the
> >> > > > database, the path of the image could be on a table.
> >> > > > How can I do that?
> >> > > >
> >> > > > --
> >> > > > LUIS ESTEBAN VALENCIA
> >> > > > MICROSOFT DCE 3.
> >> > > > MIEMBRO ACTIVO DE ALIANZADEV
> >> > > > http://spaces.msn.com/members/extremed/
> >> > > >
> >> > > >
> >> > > >
>
>|||There is only one Unattended Execution Account per report server. This
account would be used for all remote secured sites.
The closest you can get to achieve this on RS 2000 is to write your own
custom assembly to retrieve the remotely secured images. Then you would have
full control over which credentials to use when accessing certain sites.
However, you no longer have the benefit of the credentials securely managed
and stored encrypted by the report server - you have to take care of that in
the custom assembly yourself.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"prophead" <prophead@.discussions.microsoft.com> wrote in message
news:A4A36A70-583A-401E-9D9C-80D93EE224AD@.microsoft.com...
> The notes on configuring the Unattended Execution Account are interesting,
> and I can see how they would apply within a domain or intranet. Howeve, I
> have a situation where my
> customer is running a report on my Report Server and the photos to which
> the
> URL's in the datafield point are on his/her secured server, which requires
> a
> username and pwd to access?
> Windows seems to store credentials for such access within user profiles
> (e.g., get prompted for username and password when accessing a secure FTP
> site and also get an opportunity to save the credentials). Can such
> credentials be set once for the unattended report processing account for
> each
> remote secured FTP/HTTP site that will contain photos that will be
> referenced?
> -prophead
>
> "Robert Bruckner [MSFT]" wrote:
>> The SP1 readme explains why it "works" on SP1. It is something that was
>> specifically added to SP1:
>> http://download.microsoft.com/download/7/f/b/7fb1a251-13ad-404c-a034-10d79ddaa510/SP1Readme_EN.htm#_external_images
>> In particular, make sure you read the comment about configuring the
>> UnattendedExecutionAccount in the readme notes.
>> --
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> "prophead" <prophead@.discussions.microsoft.com> wrote in message
>> news:DC1075B2-4261-419D-9ABD-5ED96C5A0E2F@.microsoft.com...
>> > Thanks, Neo. Installing SP1 fixed the problem. Evidently there was a
>> > problem when you set the source to "External" and the Value to a field
>> > from
>> > the db with a URL. I also deleted the original report from the server
>> > and
>> > re-deployed it, so that might have fixed it as well.
>> >
>> > -prophead
>> >
>> > "Neo" wrote:
>> >
>> >> Prophead,
>> >>
>> >> In my report, I have an image placed in the page header and the report
>> >> text
>> >> is placed in the body. I set the image value =>> >> ReportItems!txtImageLink.Value.
>> >>
>> >> What is the value of Fields.PhotgraphLocation.Value? It doesn't look
>> >> like
>> >> the field is being properly filled in. It should be something like
>> >> "http://mysite/images/img.gif".
>> >>
>> >> BTW - SRC is the property of the Img html tag. Since the field is not
>> >> being
>> >> populated correctly, it will be "" or null.
>> >>
>> >>
>> >> "prophead" wrote:
>> >>
>> >> > Neo,
>> >> >
>> >> > I tried what you suggested, but can't get it to work. I put
>> >> > =ReportItems!txtPhotoLoc.Value in the Value property of the Image
>> >> > control.
>> >> > The Source property is set to External. txtPhotoLoc is the name of
>> >> > a
>> >> > textbox
>> >> > that has its value set to =Fields!PhotographLocation.Value.
>> >> >
>> >> > Is this what you did? It doesn't work for me in either the preview
>> >> > or
>> >> > the
>> >> > deployed version viewed through IE.
>> >> >
>> >> > Is there something special about the "ReportItems" qualifier? I
>> >> > can't
>> >> > find
>> >> > that object group anywhere in my project, but it doesn't complain
>> >> > about
>> >> > it
>> >> > when I save and deploy it.
>> >> >
>> >> > I checked and privileges are not a problem -- the content of
>> >> > PhotographLocation it a fully qualified path to a URL you can paste
>> >> > in
>> >> > any
>> >> > browser and get an image (e.g.,
>> >> > http://msdn.microsoft.com/library/toolbar/3.0/images/banners/msdn_masthead_ltr.gif).
>> >> >
>> >> > When I view source on the results in IE, the area that should show
>> >> > the
>> >> > picture contains
>> >> > <TD COLSPAN="5" class="a55"><IMG class="r1" src="http://pics.10026.com/?src="></TD></TR>
>> >> > Why does SRC = ""?
>> >> >
>> >> > -prophead
>> >> >
>> >> > "Neo" wrote:
>> >> >
>> >> > > Hi Luis,
>> >> > >
>> >> > > I figured out a way to do it using Links. Create a textbox and
>> >> > > point
>> >> > > it to
>> >> > > link stored in the dB. Create an image and under the image
>> >> > > properties, set
>> >> > > it's value to that textbox (e.g.,
>> >> > > =ReportItems.txtImageLink.Value).
>> >> > >
>> >> > > HTH
>> >> > >
>> >> > > "Luis Esteban Valencia" wrote:
>> >> > >
>> >> > > > I want to show a different image on my header depending on some
>> >> > > > data on the
>> >> > > > database, the path of the image could be on a table.
>> >> > > > How can I do that?
>> >> > > >
>> >> > > > --
>> >> > > > LUIS ESTEBAN VALENCIA
>> >> > > > MICROSOFT DCE 3.
>> >> > > > MIEMBRO ACTIVO DE ALIANZADEV
>> >> > > > http://spaces.msn.com/members/extremed/
>> >> > > >
>> >> > > >
>> >> > > >
>>

No comments:

Post a Comment