views:

33

answers:

1

I have got an image in an image control on a report in SSRS 2008. The image is coming from an external source, and varies in width. I would like to centre the image within the control, but the image control does not have an equivalent of the text box's TextAlign property to allow right/left/center alignment to be done automatically.

I have seen methods to dynamically calculate the amount of left padding as a hack to solve this, http://blogs.msdn.com/chrishays/archive/2004/10/27/CenteredImages.aspx, but the solution gives an error in SSRS 2008, perhaps not surprising given the age of the article.

Has anybody got a solution to this for SSRS 2008?

A: 

Why can't you just set sizing to "fit proportional" ?

adolf garlic
Unless I'm missing something, "Fit proportional" just affects the scaling of the image, it does not affect how it is aligned within the control.
Keith
Wouldn't you want the image placeholder to be a fixed size? Regardless, this may be of interest as an alternative solution http://bobp1339.blogspot.com/2007/11/dynamic-images-in-reports-slight-return.html
adolf garlic