Print Page | Close Window

Loading an Image

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=12949
Printed Date: 29 Apr 2024 at 12:39am


Topic: Loading an Image
Posted By: Goldberg
Subject: Loading an Image
Date 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



Replies:
Posted By: hilfy
Date 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


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: Goldberg
Date 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.


Posted By: hilfy
Date 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


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: Goldberg
Date 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


Posted By: CircleD
Date Posted: 20 Apr 2011 at 5:56pm
Originally posted by hilfy

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


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?


-------------


Posted By: Goldberg
Date Posted: 20 Apr 2011 at 10:32pm

I'm using the 2010 version, if that helps.



Posted By: hilfy
Date 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


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: Goldberg
Date 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.


Posted By: Myra
Date 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?


Posted By: Myra
Date Posted: 09 Jun 2011 at 9:27am
Originally posted by Myra

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 DB are PDFs.  Maybe its not compatible?


Posted By: hilfy
Date Posted: 12 Jun 2011 at 6:25am

PDF's are not image files, so they won't load into an image object.  Images are things like .jpg, .bmp, etc.  If you need to load .pdf files, you'll need to use an OLE object instead of an image.

-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window