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

Picture in report designer 1

Status
Not open for further replies.

sisan

Programmer
Jan 9, 2002
39
ID
Can we set the picture in report designer at run time ?
I use LoadPicture, but not work.

Help me..., please help me....
 
The only way that I know how to do this is with the Crystal Reports RDC. It requires that you have the path to the picture stored in your database, if so follow these basic steps.

1. Place a picture box (Picture1 - ICROleObject)in the section that you want the picture to appear (Section3).

2. Place a field that will pull the path of the picture from the database (field1), and set its suppress property to true. You don't want this to appear on the report.

3. Place the following code in the section Format event of the report.

Private Sub Section3_Format(ByVal pFormattingInfo As Object)
Set Picture1.FormattedPicture = LoadPicture(Field1.Value) 'changes the picture in the section
End Sub

That's all there is to it. You can place this a details section and have a different picture for each record.


zemp
 
Yes. I've found what I looked for. Thanx, Zemp!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top