Results 1 to 3 of 3

Thread: Crystal - Report - MS Access

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2009
    Posts
    7

    Crystal - Report - MS Access

    Dear One,

    I am using MS access and Crystal report in application. I have stored image in mm DB as path,

    The DS as follows,
    Regno - Text
    Name - Text
    Gender - Text
    M1 - number
    M2- Number
    .
    .
    .
    image path

    Now, I have designed a mark sheet in crystal report, I am keeping it as marksheet.rpt

    What is the procedure to load the image in the same report in the corner of the mark sheet for all the students?

    Thank you

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Crystal - Report - MS Access

    Moved To Reporting

  3. #3
    Frenzied Member
    Join Date
    May 2006
    Location
    some place in the cloud
    Posts
    1,886

    Re: Crystal - Report - MS Access

    The way I do it, is:
    The rpt is inside the project integrating Crystal Reports (is not an external .rpt file)
    Use RDC
    And in the desired Report Section's Format event, use code like the next :
    (In this example I'm changeing a picture in every page header)
    Code:
    Private Sub PageHeaderSection1_Format(ByVal pFormattingInfo As Object)
    
    Dim Pic1            As OLEObject
    Dim I               As Integer
    
        For I = 1 To PageHeaderSection1.ReportObjects.Count
            If PageHeaderSection1.ReportObjects(I).Kind = CRAXDRT.crOLEObject Then
                Set Pic1 = PageHeaderSection1.ReportObjects(I)
                On Error Resume Next 'Just in case that the jpg doesn't exist (Could use Dir)
                Set Pic1.FormattedPicture = LoadPicture(App.Path & "\EasyLab.jpg")
                On Error GoTo 0
                Exit For
            End If
        Next I
    
    End Sub
    JG

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width