Author |
Message |
Goldberg
Groupie
Joined: 15 Apr 2011
Location: Portugal
Online Status: Offline
Posts: 58
|
Topic: Loading an Image Posted: 18 Apr 2011 at 1:24am |
Hello,
From the database field, I have a textbox that shows me the dinamic image path. How can I convert it to the image itself? I've inserted an ole object, on option graphic location chose the variable that contains the path, but it didn't show the image.
What am I doing wrong?
Thanks
Edited by Goldberg - 18 Apr 2011 at 1:38am
|
IP Logged |
|
hilfy
Admin Group
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
|
Posted: 18 Apr 2011 at 6:04am |
You don't want an OLE object, you want an Picture/Image object. You can then set the path to the image file in the properties of the object. What type of graphics are you displaying?
-Dell
|
|
IP Logged |
|
Goldberg
Groupie
Joined: 15 Apr 2011
Location: Portugal
Online Status: Offline
Posts: 58
|
Posted: 18 Apr 2011 at 10:21pm |
It is just .jpg images. The path is the one that the "imagepath" field gives me. If I do right click -> insert -> picture, it wil open the windows browser and ask me to choose an image to insert it already. Then, that would only show that image.
|
IP Logged |
|
hilfy
Admin Group
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
|
Posted: 19 Apr 2011 at 7:39am |
That's ok - pick a "dummy" picture to use for design-time. After placing the image on the report, right-click on it and go to Format. Go to the Image tab (it may be named Picture, I don't remember and I don't have Crystal on this computer.) In there there is a place to set the image based on a formula which will be the field from your database that contains the path and image name.
-Dell
|
|
IP Logged |
|
Goldberg
Groupie
Joined: 15 Apr 2011
Location: Portugal
Online Status: Offline
Posts: 58
|
Posted: 20 Apr 2011 at 7:03am |
Thanks for your time, hilfy, but I'm still not gettin' it. I did it like on the following image:
http://img848.imageshack.us/i/testeb.jpg/
1) Shows the "dummy-image" and the field (Foto) that gives me the image path;
2) Shows the same as in point 1) but in design preview;
3) Image tab of the "dummy-pic" properties; I clicked on "Local do gráfico" (graphic location) and it opened the step 4;
4) I choose the field that contains the imagepath. "Aluno" is the table where the field "Foto" is.
What am I doing wrong here? Thanks
Edited by Goldberg - 20 Apr 2011 at 7:04am
|
IP Logged |
|
CircleD
Senior Member
Joined: 11 Mar 2011
Location: United States
Online Status: Offline
Posts: 251
|
Posted: 20 Apr 2011 at 5:56pm |
Originally posted by hilfyYou don't want an OLE object, you want an Picture/Image object. You can then set the path to the image file in the properties of the object. What type of graphics are you displaying?
-Dell The reports built into the base program we use, and I write/modify reports for
have images as OLE objects.They are bitmaps though and not jpegs.I don't
know what version of Crystal he's using but in 2008 you click on the
"insert picture" button,choose the picture you want and it gives you a
placement box to move around until you get it where you want it to
be.You have to be careful though to make the bitmap the size you want
the image to be because as far as I know you can't resize it on the
report.Just for future reference I was just wondering why this wouldn't be a viable fix for what he's trying to do or am I missing something?
|
IP Logged |
|
Goldberg
Groupie
Joined: 15 Apr 2011
Location: Portugal
Online Status: Offline
Posts: 58
|
Posted: 20 Apr 2011 at 10:32pm |
I'm using the 2010 version, if that helps.
|
IP Logged |
|
hilfy
Admin Group
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
|
Posted: 21 Apr 2011 at 4:13am |
There is no 2010 version of Crystal. If you're using the version that comes with Visual Studio 2010, they you're actually running a version of Crystal 10 unless you've installed Crystal 2008 on top of it.
I verified yesterday that when you insert a picture, Crystal is actually inserting an OLE object (I don't have Crystal installed on the workstation where I'm posting this from, so I couldn't check before I posted...) I'm not sure at this point why your images aren't updating.
-Dell
|
|
IP Logged |
|
Goldberg
Groupie
Joined: 15 Apr 2011
Location: Portugal
Online Status: Offline
Posts: 58
|
Posted: 21 Apr 2011 at 4:55am |
Yes, running the Crystal version of Visual Studio 2010.
I thought the "10" came from 2010, but ok.
|
IP Logged |
|
Myra
Newbie
Joined: 09 Jun 2011
Online Status: Offline
Posts: 2
|
Posted: 09 Jun 2011 at 9:25am |
Hi Dell -
I'm running CR XI and have tried to add "dummy" picture to use during design-time, and the image will not display as I expected. What am I doing wrong?
Although, the field that links to the database to the files are PDFs. Is this type not compatible?
Edited by Myra - 09 Jun 2011 at 9:28am
|
IP Logged |
|
|