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

Insert .jpg into CR

Status
Not open for further replies.

kimtp

Programmer
Jun 15, 2002
310
US
Am trying to insert pics dynamically into a name tag report in crystal reports. Was using a text field for the pic in Access until it told me that was no-no when I tried to use an OLE field. Then I discovered that a BLOB field in CR had to be an OLE, Hyperlink type field so I changed the sql to read UNION ALL.

I have placed the field onto the CR report, but no pics showup. I have included my code:

sSql = "SELECT Members.ID, Members.FirstName, Members.LastName, MarriedName," & _
" Classyear, Members.ClassPhoto" & _
" FROM Members INNER JOIN Attending ON Members.ID = Attending.ID" & _
" Where Attending.Attending" & _
" ORDER BY ClassYear, Lastname,MarriedName" & _
" UNION ALL SELECT Members.ID, Spouse," & _
" IIF(MarriedName = '',Lastname, Marriedname), '(Spouse)', ClassYear," & _
" Members.ClassPhoto" & _
" FROM Members INNER JOIN Attending ON Members.ID = Attending.ID" & _
" WHERE Spouse <> '' AND Attending.Attending" & _
" ORDER BY Classyear, Lastname, MarriedName"
Set crxRpt = crxApp.OpenReport(App.Path & "\drNameTags.rpt")
crxRpt.Database.SetDataSource rs, 3
crxRpt.DiscardSavedData
With crvNameTags
.ReportSource = crxRpt
.ViewReport
.Zoom (60)
.Refresh
.DisplayTabs = False
.EnableGroupTree = False
.EnableCloseButton = False
End With

Any help is appreciated.

Thanx.

Kim
 
Thanks. I have CR9, VB6. Found the example and unzipped it. Although this example loads the pix programatically, it seems that it is a static process.

I am looking for example(s) so that when the user loads a photo onto the interface, the photo will then be transferred to the name tag. If an updated photo is available, it can be loaded and the name tag would reflect that change.

Any ideas would be great.

 
If the images are stored in the database, look at the employee profile example report supplied by Crystal in the samples reports, it updates the photos and names based on fields.

-k
 
Thanx for the reply. The example you are talking about seems to have no database connected to it. The pix seem to be stored in the CR form in this example. There is no sql or other data showing how to.

Any ideas would be great.

Thanx.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top