SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Need help with an expression to dynamically display an image


Need help with an expression to dynamically display an image

Author
Message
boxy99
boxy99
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search