borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (want report as per date)Next Topic (How to start coding to take printout?) New Topic New Poll Post Reply
AndreaVB Forum : Reporting tools : Invalid Report Source
Poster Message
bluetuz
Level: Trainee

Registered: 25-05-2006
Posts: 2

icon 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

25-05-2006 at 09:17 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Reporting tools : Invalid Report Source
Previous Topic (want report as per date)Next Topic (How to start coding to take printout?) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder