Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Need help with an expression to dynamically display an image Expand / Collapse
Author
Message
Posted Saturday, March 1, 2014 12:33 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, March 2, 2014 7:52 AM
Points: 1, Visits: 8
Newbie Alert!!

I have a dataset that contains character, numeric, and image data. The image data is provided by a join to a database table that stores .jpg images, and each row has just one image.

In my report I'm not using a table or a matrix, I want the freedom to position data where and how I want it to appear.

For the character and numeric data I'm binding and populating text boxes by using this type of expression:
=max(iif(Fields!tablename.Value="person", Fields!numrows.Value, Nothing), "FragReport")

That works fine, but it does not work for the image. In image properties I'm selecting Database as the source, image/jpeg as the MIME type, and 'Use this field' has the following expression:

=max(iif(Fields!tablename.Value="person", Fields!imageBinary.Value, Nothing), "FragReport")

(imageBinary is the name of the column with image data)

When I preview the report I get two warnings:

1 [rsMinMaxOfNonSortableData] The Value expression for the image ‘Image4’ uses the Min or Max aggregate function on data that cannot be sorted. The functions Min and Max can be used only on data that can be sorted (such as numeric, string, and DateTime data).

2 [rsInvalidExternalImageProperty] The value of the ImageData property for the image ‘Image4’ is “=max(iif(Fields!tablename.Value="person",Fields!imageBinary.Value, nothing),"FragReport")”, which is not a valid ImageData.

I've been able to make the report work using embedded images but there are likely several reports of a similar style and I want to store the images in a database.

I'm a newbie, and I need a little help getting over this hurdle.

Thank you.
Post #1546661
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse