January 4, 2008 at 1:25 pm
I'm using the Report Designer to display dynamic images stored in a local folder. I have a DisplayImage function in the Code page of the Report which uses a DocID field to return a URL, which in this case is "file://\\tot-pln-er\MapDocs\5442.jpg". I have "=Code.ShowImage(Fields!DocID.Value) in the Image Data Value field, but the image is not displaying. I have the URL returned from the function also displaying inside a textbox just under the Image control, and it is correct. If I type the exact same thing into the Image Value field manually (or paste it in), the image displays beautifully. It seems that maybe it just isn't recognizing the returned string as a (local) URL, or ???. Please help! Thanks.
January 4, 2008 at 1:37 pm
Oops. The correct function name is ShowImage, not Display Image. It is getting called correctly, I believe.
January 4, 2008 at 3:32 pm
Hi all. I solved my problem after a day and a half or so. I was using a STR() function to convert an integer DocID field to text (ie."file://tot-pln-er/MapDocs/" & STR(Fields!DocID.Value) & ".jpg") and finally I noticed that the STR() function always leaves a space for a possible negative sign, therefore messing up the file name with an extra space. Using FORMAT(Fields!DocID.Value,"G") solved the problem and produced the correct file name, bringing up the image(s) perfectly. Thanks to everyone who posts on this site, 'cause I learned a lot of other stuff researching this problem.
Ed
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply