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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Picture in Crystal Report

Status
Not open for further replies.

zqtqzq

Programmer
Jul 23, 2003
61
0
0
A2
I am using Crystal report 8.5
I have an access 2000 database with Employee table with the structure

EmployeeID Text 15
EmpPicture Text 255

I store the path of the picture in the EmpPicture field in the employee table

I want the picture to show in a report
Pls how can i achieve this
 
I'm using Crystal Reports 9 with SQL Server but the solution might help you as well.
I write the picture to the database using ADODB.Stream. In the CR report I select the image (blob) to show on the report.
I have a lot of pictures so I don't want to store them in the database. At runtime I'm writing a temporary table in which the selected pictures are stored.
The code to use ADODB.Stream:

Code:
dim myStream as ADODB.Stream

myStream.Open
myStream.LoadFromFile mvarfoto_name 'name including path
rs.Fields("foto_size") = myStream.Size
rs.Fields("foto_file") = myStream.Read
myStream.Close
The field "foto_file" can now be referenced in Crystal Reports.

 
This may be of help. thread149-370665

zemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top