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!

Pics in Crystal Reports 2

Status
Not open for further replies.

kimtp

Programmer
Jun 15, 2002
310
US
Am trying place a photo stored in an Access database into a Crystal Report report. Whenever I set the field to be text in Access, the only thing that shows up on the report is the name of the .jpg. If I try to set the field to OLE or memo and since I am using a union query, I get the message 'Cannot use Memo, OLE or Hyperlinked Object field fldname in the Select clause of a union query'.

Is there someway around this?

Thanks

Kim
 
It sounds like you have a record selection formula on the picture field.

Or possibly you are writing the report against an access query rather than against the access database.

Did you do either of these?



Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
Thanks for the response. Here is the query:

sSql = "SELECT Members.ID, Members.FirstName, Members.LastName, MarriedName," & _
" Classyear" & _
" FROM Members INNER JOIN Attending ON Members.ID = Attending.ID" & _
" Where Attending.Attending = true" & _
" ORDER BY ClassYear" & _
" UNION SELECT Members.ID, Spouse," & _
" IIF(MarriedName = '',Lastname, Marriedname), '(Spouse)', ClassYear," & _
" FROM Members INNER JOIN Attending ON Members.ID = Attending.ID" & _
" WHERE Spouse <> '' AND Attending.Attending" & _
" ORDER BY Classyear"

rs.Open sSql, cn
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

I am not sure where to go with this to accomplish adding a photo to the name tag. Any help is greatly appreciated.

Kim Peterson
 
That all looks like VB code to me, not a crystal report. In the crystal report designer, click on insert, field object, and select your picture field, and place it on the report. Have you done anything like this or are you relying on code to do everything?

If you are relying on code, I would post this question in the crystal reports 3 integration forum, where there are some other VB gurus who could most likely help you out.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
If you're not expecting any dupliates, try changing your UNION to a UNION ALL.

-dave
 
It is VB code. I am trying to insert the pics dynamically. I changed the Union Select to Union All Select and that got rid of the 'cannot do this' msg.

I will go to the CR 3 Integration forum. Many thanks for your help.

Kim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top