0

I want to use a picturebox in my crystal report the picture that i want to place on the report is now on my form.I have declared the picture object.but i do not know its property for example using crystal reports when you declare a text object u say textobject.text.what if u want to delare a picturebox.

Sub cryview()

        Dim rpt As New CrystalReport3()
        Dim sql_personnel As String = procesSQL(txtSQL.Text, cmbTableName.Text)
        Dim dt As New DataTable
        dt = MyFormz.cl_Class.SelectRows(sql_personnel)

        Dim ReportTitle As CrystalDecisions.CrystalReports.Engine.TextObject
        Dim ReportPhone As CrystalDecisions.CrystalReports.Engine.TextObject
        Dim Logo As CrystalDecisions.CrystalReports.Engine.PictureObject

        ReportTitle = rpt.ReportDefinition.Sections(0).ReportObjects("txtReportTitle")
        ReportTitle.Text = Me.txtTitle.Text
        rpt.SetDataSource(dt)

        ReportPhone = rpt.ReportDefinition.Sections(0).ReportObjects("txtReportPhone")
        ReportPhone.Text = Me.txtPhone.Text
        rpt.SetDataSource(dt)

        Logo = rpt.ReportDefinition.Sections(0).ReportObjects("")
        Logo.What? = Me.PictureBox1.Image
        rpt.SetDataSource(dt)


        CrystalReportViewer1.ReportSource = rpt

    End Sub
2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by ShahanDev
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.