Skip to Content
0
Former Member
Sep 03, 2010 at 07:22 PM

Name Tags CR9 vs CRXI R2

21 Views

Have a report for name tags that will show a picture if one is present for each record. If no picture, just the name is printed. There are three sections, First Name + place holder for the picture, Maiden name and Last Name + a hidden field for class photo. A photo is only inserted for the Last name on the record. No photo for the spouse. This code works in VB6 with CR9.

The code used in both versions of Crystal Reports is:

Private Sub crSection_Format(ByVal pFormattingInfo As Object)
    On Error GoTo ErrHandle
     Set crSection.ReportObjects("Classmate").FormattedPicture = _
        LoadPicture(crNameTagsAdhesive.Sections("DetailSection3").ReportObjects("PicFile").Value)
     
crSection_Format_Exit:
    Exit Sub
 
ErrHandle:
   
End Sub

Ludek Uher from the legacy forum suggested that I post here the query which was duplicated in the designer:

SELECT FirstName, LastName, MaidenName, ClassYear, ClassPhoto, ClassYear as SortYear, 
Lastname AS SortName, 1 AS SortOrder
FROM Members
WHERE NumAttend>0 
UNION ALL SELECT Spouse, LastName, Null, Null, Null, Classyear, Lastname, 2
FROM Members
WHERE NumAttend>1
ORDER BY SortYear, SortName, SortOrder

There is a picture (placeholder picture) for each person including spouses.

I commented out the first section of code above in vb6/CRXI R2 and no change. Therefore it seems that there needs to be some changes in that section.

Any ideas are appreciated.

Thanks.

Kim