Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Pictures in cr9 vs cr10.5/11 Post Reply Post New Topic
Author Message
kimt
Newbie
Newbie
Avatar

Joined: 06 Oct 2009
Online Status: Offline
Posts: 39
Quote kimt Replybullet Topic: Pictures in cr9 vs cr10.5/11
    Posted: 24 Oct 2010 at 8:30am
Presently I am using vb6 & cr9 using this to change pictures for each record in a name tag report in the form containing the viewer:

Private WithEvents crSection As CRAXDRT.Section
Private Report As CrystalReport1

Private Sub Form_Load()   
   Set Report = crNameTagsAdhesive
End Sub

Private Sub crSection_Format(ByVal pFormattingInfo As Object)
    On Error GoTo ErrHandle

     Set crSection.ReportObjects("Classmate").FormattedPicture = _
        LoadPicture(Report.Sections("DetailSection3").ReportObjects("PicFile").Value)
crSection_Format_Exit:
    Exit Sub

ErrHandle:
    If Err.Number = 53 Then
        MsgBox Err.Description, vbCritical, "No Photos"
        Resume Next
    Else
        MsgBox Err.Number & " - " & Err.Description
    End If
End Sub

If a record has a picture attached it shows on the report.

Tried to do the same thing with CR XI using the same code and get a 'Can not find QE property' error message.

Also tried putting this code in the report:

Private Sub DetailSection1_Format(ByVal pFormattingInfo As Object)
    On Error GoTo Err
    Set crNameTagsAdhesive.Classmate.FormattedPicture = _
        LoadPicture(CrystalReport1.PicFile.Value)
detailsection1_format_exit:
    Exit Sub
Err:
    MsgBox Err.Number & " - " & Err.Description
    Resume Next
End Sub

There is no error message but when the code is stepped through there is no value for CrystalReport1.PicFile.Value which leads me to believe that is the missing QE property.  On further evaluation even if there is a value, the error message appeas 'can not find QE property'.

What changes need to be made to make this work in CR XI and, hopefully, in vs2008 cr10?

Thank you.



Edited by kimt - 25 Oct 2010 at 2:50am
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.