Groups | Blog | Home
all groups > sql server reporting services > september 2006 >

sql server reporting services : Graphic lost on parameter change


SteveM
9/12/2006 3:04:58 PM
I have a graphic that I place on the screen based on the following
logic. I also have a non-queried parameter that I can toggle between
"average" and "cumulative".


=Iif(ISNOTHING(Fields!KPI.Value),"grey.gif",Iif(Fields!KPI.Value
=-1,"Red.gif",Iif(Fields!KPI.Value = 0,"Yellow.gif","green.gif")))

The value fields are calculated as follows:
=iif(
Parameters!CumulativeOrAverage.Value="Cumulative",Fields!KPIValue.Value,Fields!KPIValueAvg.Value)


The first time into the report, the graphics are displayed correctly.
If I toggle the value of the parameter value, the screen is
re-displayed and the data field for the Values is displayed correctly.

However, the graphics for the field based on KPI.Value loses the
graphic and ends up displaying a red X in place of the graphic.

I even tried changing the graphic field as follows to try to handle the
change to the parameter. Any idea what is going on here and why the
graphic is lost?

=iif(
Parameters!CumulativeOrAverage.Value="Cumulative",Iif(ISNOTHING(Fields!KPI.Value),"grey.gif",Iif(Fields!KPI.Value
=-1,"Red.gif",Iif(Fields!KPI.Value =
0,"Yellow.gif","green.gif"))),Iif(ISNOTHING(Fields!KPI.Value),"grey.gif",Iif(Fields!KPI.Value
=-1,"Red.gif",Iif(Fields!KPI.Value = 0,"Yellow.gif","green.gif"))))
SteveM
9/13/2006 5:55:49 AM
I'll answer my own question in case anyone has a similar problem.

My images were previously defined as "external". Changing the images to
"embedded" in the report solved the problem. Apparently, if a parameter
is changed which simply toggles some of the report items and does not
cause a database refresh may cause the images to be "lost" when it is
refreshed. So, apparently, along with no database refresh, it doesn't
go back to the server for included items, such as images.

Changing the images to embedded makes sure that the images are
available to the report in this case. Personally, I think this is a
bug, or should be treated as one. Or, should be documented as to
functionality.



[quoted text, click to view]
AddThis Social Bookmark Button