ImageURL Addresses Stored In MSSQLSERVER 2008 DataBase - How Can I Use This Addresses For Showing Im

Stimulsoft Reports.WEB discussion
Post Reply
Majid000
Posts: 7
Joined: Fri Apr 09, 2010 3:59 am
Location: Iran

ImageURL Addresses Stored In MSSQLSERVER 2008 DataBase - How Can I Use This Addresses For Showing Im

Post by Majid000 »

hi my dear friends :
i have many pix stored in my project -> asp.net web app with c#
when u place a Image Control in a web form in this project so it's ImageURL is Like This :

Image1.ImageURL = "~/Images/Pic1.jpg";

so i stored all of this addresses in my database and use them for filling imageurls.

the name of that column in my table (that keeping addresses) is -> Personel.[PictureURL]

for making a report i build a sqldatasource (this sqldatasource connect to a storted procedure that have one parameter) in my project and use it for my report , so i made a report by wizard and and at last i replace the textbox of PictureURL (In Data Section Of Report)with an image control.

at now how can i tell this image show my pix in my project by PictureURL Column???

I do many many ways about that -> such as Imgeurl , datacolumn , ImageData , GetImage event , BeforePrint event and etc in design mode of a report.

but did not work ...
i read a topic about this problem in this forum , but not help ...
i almost watch all of the important video helps....

i would be really really appreciate u for attention and tell step by step that what can i do for fix this problem???
best regards

Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

ImageURL Addresses Stored In MSSQLSERVER 2008 DataBase - How Can I Use This Addresses For Showing Im

Post by Jan »

Hello,

You can use following expression in ImageURL property of image component:

Code: Select all

{Personel.PictureURL}
Thank you.
Majid000
Posts: 7
Joined: Fri Apr 09, 2010 3:59 am
Location: Iran

ImageURL Addresses Stored In MSSQLSERVER 2008 DataBase - How Can I Use This Addresses For Showing Im

Post by Majid000 »

thanks for answer ...
one of My PictureURL Like This -> ~/Images/Pic01.jpg

i test your code in imageURL - but it did n't work at all....
any idea?
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

ImageURL Addresses Stored In MSSQLSERVER 2008 DataBase - How Can I Use This Addresses For Showing Im

Post by Jan »

Hello,

You need specify full image url path. For example:http://www.website.com/image.jpeg

Thank you.
Majid000
Posts: 7
Joined: Fri Apr 09, 2010 3:59 am
Location: Iran

ImageURL Addresses Stored In MSSQLSERVER 2008 DataBase - How Can I Use This Addresses For Showing Im

Post by Majid000 »

really thanks for your attention...
image urls like -> ~/Images/a.jpg do not work at all as u said
image urls like -> Images/a.jpg have two conditions in my report:

(i build a folder in my project [root] named Images and my pix are here)


1-when u preview a report in design mode -> so i had message about this url s
2-but when i exit report design mode and go to vs 2008 and view in browser a page that contains that report so every thing is good and i can see my pix...

i am so worry that this subject will be a problem after i uploaded my project in a server...
can u explain this reaction?
thanks a lot
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

ImageURL Addresses Stored In MSSQLSERVER 2008 DataBase - How Can I Use This Addresses For Showing Im

Post by Jan »

Hello,

Use absolute path to your images in both cases.

Thank you.
Post Reply