Sunday, March 11, 2012

Does Image Control support missing images?

Is there a clever way to display an alternate image or message if the image
control cannot find the image as specified in the External URL?
In other words... we supply the image name via a field... But if the image
does not exist, we get the red X. I want to display something other than the
red X.
Any ideas?
Thanks,
JimIf you have SP1 installed, then you could use an expression like this to
"hide" non-existing external images.
=iif(Trim(Fields!ExternalImagePath.Value) = "", Nothing,
Fields!ExternalImagePath.Value)
I.e. if the image.Value expression evaluates to Nothing, no red X will be
shown.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jim L" <jim@.noaddress.com> wrote in message
news:uL31USbdEHA.1648@.TK2MSFTNGP11.phx.gbl...
> Is there a clever way to display an alternate image or message if the
image
> control cannot find the image as specified in the External URL?
> In other words... we supply the image name via a field... But if the
image
> does not exist, we get the red X. I want to display something other than
the
> red X.
> Any ideas?
> Thanks,
> Jim
>|||Thanks Robert for taking the time to respond... however...
What I am looking for is this - The field will be populated with the name of
the image, we just don't know if the image will be there or not.
The image control in ASP.Net supports this - it will display a text message
instead of the Red X.
Jim
"Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> wrote in message
news:%23NIFYbbdEHA.1952@.TK2MSFTNGP11.phx.gbl...
> If you have SP1 installed, then you could use an expression like this to
> "hide" non-existing external images.
> =iif(Trim(Fields!ExternalImagePath.Value) = "", Nothing,
> Fields!ExternalImagePath.Value)
> I.e. if the image.Value expression evaluates to Nothing, no red X will be
> shown.
> --
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> "Jim L" <jim@.noaddress.com> wrote in message
> news:uL31USbdEHA.1648@.TK2MSFTNGP11.phx.gbl...
> > Is there a clever way to display an alternate image or message if the
> image
> > control cannot find the image as specified in the External URL?
> >
> > In other words... we supply the image name via a field... But if the
> image
> > does not exist, we get the red X. I want to display something other than
> the
> > red X.
> >
> > Any ideas?
> >
> > Thanks,
> > Jim
> >
> >
>|||An image in Reporting Services is not an ASP.NET image control. The desired
functionality is currently not supported. The closest you can get today is:
* either "hiding" non-existing external images through expressions as
outlined in the previous posting
* or use an expression on the Visibility property of the Image reportitem to
conditionally hide non-existing images. The expression would make a call
into a custom assembly with the image path value as parameter and would
return true if the image exists - which would then not hide the Image
reportitem. So it is doable right now, but there is some work involved to
get it done.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jim L" <jim@.noaddress.com> wrote in message
news:OWg%23LibdEHA.1356@.TK2MSFTNGP09.phx.gbl...
> Thanks Robert for taking the time to respond... however...
> What I am looking for is this - The field will be populated with the name
of
> the image, we just don't know if the image will be there or not.
> The image control in ASP.Net supports this - it will display a text
message
> instead of the Red X.
> Jim
>
> "Robert Bruckner [MSFT]" <robruc@.online.microsoft.com> wrote in message
> news:%23NIFYbbdEHA.1952@.TK2MSFTNGP11.phx.gbl...
> > If you have SP1 installed, then you could use an expression like this to
> > "hide" non-existing external images.
> > =iif(Trim(Fields!ExternalImagePath.Value) = "", Nothing,
> > Fields!ExternalImagePath.Value)
> >
> > I.e. if the image.Value expression evaluates to Nothing, no red X will
be
> > shown.
> >
> > --
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> >
> >
> >
> > "Jim L" <jim@.noaddress.com> wrote in message
> > news:uL31USbdEHA.1648@.TK2MSFTNGP11.phx.gbl...
> > > Is there a clever way to display an alternate image or message if the
> > image
> > > control cannot find the image as specified in the External URL?
> > >
> > > In other words... we supply the image name via a field... But if the
> > image
> > > does not exist, we get the red X. I want to display something other
than
> > the
> > > red X.
> > >
> > > Any ideas?
> > >
> > > Thanks,
> > > Jim
> > >
> > >
> >
> >
>

No comments:

Post a Comment