Hi to all,

I use Vb.net 2008 version and crystal Reports 2008 V12

I had create a OLE.Object in my report and i need to put, dynamicattly, a picture into this OLE.Object...the OLE.Obect name is Picture6

I had create this instruction into my code:
Code:
Dim pic = CType(rpt.ReportDefinition.ReportObjects("Path_imagem_carro_piloto"), PictureObject)
        pic.ObjectFormat.EnableSuppress = True
but i have an error that is "Index out of limits", and sincerelly i don't know the way to resolve this.

This is the code that i use to call the report and put a few thinks on it:

Code:
  Dim Pathreport As String = ""

        Pathreport = String.Concat(My.Application.Info.DirectoryPath & "\listagem_pilotos_prova.rpt")


        Dim rpt As New ReportDocument
        Dim pval As New ParameterValues()
        Dim disVal As New ParameterDiscreteValue()



        rpt.Load(Pathreport)

        rpt.SetDataSource(ds.Tables("Table"))


        Dim pic = CType(rpt.ReportDefinition.ReportObjects("Path_imagem_carro_piloto"), PictureObject)
        pic.ObjectFormat.EnableSuppress = True



        'Right on Parameters Fields
        disVal.Value = classificacao_piloto
        pval.Add(disVal)
        rpt.DataDefinition.ParameterFields("classificacao").ApplyCurrentValues(pval)


        disVal.Value = total_pontos_piloto
        pval.Add(disVal)
        rpt.DataDefinition.ParameterFields("pontuacao").ApplyCurrentValues(pval)

       
      
        'View the Report
        CRViewer1.ReportSource = rpt

Any help please?