Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Picture image wanted in report header Section 2

Status
Not open for further replies.

ekimr

Technical User
Jun 28, 2002
124
GB
Hi,

I must surely be doing something basic wrong, cos i am sure crystal must have the basic functionality to be able to import a picture file to the header section.

Have been reading FAQ's and other threads about Ole objects (which I have tried for my solution) , but it seems that I have to click on the object at run time to get the full image. (FAQ's talked about detail section problems).

I don't want to store the file in the report, because it gets updated (company logo) more often than my report will.

So all I want my report header to do is load in a file called f:\companylogo\phillips.jpg or .bmp not sure what the extension will be yet.

When i tried to link to it as a OLE object, it sits in the report as a small picture icon, that i need to double click on.

I want the same result of calling a file image to be imported at execution time as if I had inserted a picture to my report directly in design view and stored it.

Thanks for any help

JK
 
Hi JK,

A common question and problem. Crystal Reports can only report from a database - and that includes pictures/jpgs. It cannot navigate through a file structure to find a file and display it.

If you want your reports to have images that dynamically change - you will need to store this picture in a database as a blob field - and insert it into the report.

When the company logo changes - update the db with the new pic and all your reports will now reflect the new image. This can be achieved by creating a single table Access db with one field and one record in it. - Create a susbreport that only displays the pic and place it in the report header.

At any rate - you will have to maintain something - it is replacing the pic with a new one wherever you store it. The advantage is that you can have many (100s) of reports with this logo and change them all in one place.

I hope this helps you!

Cheers,

paulmarr
 
Thanks for the clear response.

Have to admit to being totally suprised at this 'lack of functionality' as I see it in crystal, that it cannot easily display a picture in a header section from a file location...

 
What version of Crystal are you using? In version 9 that intorduced the repository. You add a logo to the repository, and then add it your report. The logo can be linked to the repository. If you can change the master logo in the repository, the logo will be updated in the report the next time you open it.

~Brian
 
I've just tried a work-around on 8.5 that may do what you want. Create a report with your image and insert as a subreport into the page header of the existing report. Format the report header to underlay following sections. You can then change the report w/the logo and re-import the subreport when refreshing the main report and it will change the image.
 
With Crystal 8.5 you can use a COM data source in a subreport. I've developed one that will return images inside the recordset, when all you have is a file name.

Check out cViewIMAGE on my web site.

Editor and Publisher of Crystal Clear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top