Hi all,
I can't figure out how to display a dynamic image using the Image control. I've a database table that holds image information, including an address to the image on the server. ex:\\ServerName\x$\ImageDir\Header.jpg
I've tried to set the Source to External and the Value to Fields!vcPictureLocation.Value (field for the address above) in the Properties panel, but the images appear as broken symbols. Does anyone know how to accomplish this?
As always any help is greatly appreciated. Thanks!
msnyder,
The way i have done it..
Drag the image control to your report.. when the wizard pops up.
Select database as the option ,, Specify ur fields in the database and the mime type associated with in... and
Once that is done.. select the image and set its source to external and then it should work...
while ur saving the link to the database make sure its set as http://servername/Applicationname/anyfolders/filename
hope it helps
Regards
KAren
|||
KAren, thx for the reply. I was able to get the image working locally using your method. However, when I deploy the report onto the server the images are still not displaying. I viewed the source of the report viewer and it says IMG src="http://pics.10026.com/?src=" for all of the images.
As a test, I dragged an image object onto the report, set it equal to a web source, put in the same URL as what's being pulled from the database. Worked fine locally when I previewed the report, but it would not display once deployed.
I followed your steps exactly and also changed the link thats being stored in the database to your format. Any ideas? Thanks a lot!
|||ok.. where are ur images located?
|||Very sorry for the delay...
I actually made a new directory called 'Pictures" located in my website project directory. I am storing the images there. The URL I'm storing in the database looks like this...
http://SERVER/safetyforms/Pictures/0d8a3ee0-ee01-48d4-baba-b408a573e1b3.jpg
The image displays in the report viewer when I click the preview tab, but won't display when I publish it. Shows IMG src="http://pics.10026.com/?src=" in the cource code.
|||are u reports stored in a report server or are they local reports
|||
they are on a report server.
i actually found the solution. there were 2 important details, the first was the steps you outlined about how to set up the image in the report viewer. that solved problem #1. problem #2 was that anonymous access needed to be enabled. the option to enable it was in iis in the project properties.
thanks for the help!
|||I have the same problem!
but i do not solve the problem!
can you detail the solution to me?
Nanim,
FollowKarenros instructions for setting up the image in the report viewer. Make sure the pictures are being stored in a subdirectory of your main project (ex. root/Pictures) Then, go into IIS and set the permissions for the Pictures folder to anoymous. The option should be in the project properties.
The one mistake I made was setting the entire project to anoymous. We just want the pictures directory to be anoymous.
No comments:
Post a Comment