bluetuz Level: Trainee
 Registered: 25-05-2006 Posts: 2
|
Invalid Report Source
Hi, I have been checking your example code to show images in a report that collects the image from a database field that contains the path to the image. I have this code:
Dim cn As ADODB.Connection
Dim rs1 As ADODB.Recordset
cn = CreateObject("ADODB.Connection")
cn.Open(ConexionReporte)
rs1 = CreateObject("ADODB.Recordset")
rs1.Open(SQLReporte, cn)
rpt = appl.OpenReport("C:\Documents and Settings\David\Mis documentos\Visual Studio 2005\C-Orona\C-Orona\pm.rpt")
rpt.Database.SetDataSource(rs1)
sect = rpt.Sections("Section3")
rptVisor.ReportSource = rpt
The problem is that when I run the application I get a message that says "Invalid Report Source" from the last code line. rptVisor is a Report Viewer control existing in the form.
Could you help me?
Thanks a lot
|