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 (APPlication denied or object defiend error in RDC)Next Topic (A problem with Cross-tab) New Topic New Poll Post Reply
AndreaVB Forum : Reporting tools : vb.net
Poster Message
dreamtime
Level: Protégé

Registered: 23-05-2005
Posts: 6

icon vb.net

*EDIT*
I intended this to turn up at the end of this post...
Correct post
*EDIT*

Sorry to post to this thread but I have been wishing to do something similar ever since I got visual studio.net. I recently had a resurge in interest on getting this to work as my project now needs the ability to add graphics to a rpt via code.

I was therefore very pleased to find this thread after much searching.

I am however, having some trouble getting it to work.

I have followed the thread as closely as possible but I am getting a number of errors and hoped someone would be able to solve them.

Firstly, I have had to add CRAXDRT20.

Therefore my first 3 lines are...

    Dim appl As CRAXDDRT20.Application
    Dim rpt As CRAXDDRT20.Report
    Dim WithEvents sect As CRAXDDRT20.Section

I have then in the form_load (testing purposes)

        appl = New CRAXDDRT20.Application
        rpt = appl.OpenReport("c:\test.rpt")
        sect = rpt.Sections("Section2")

        Try           sect.ReportObjects.Item("Picture1").setolelocation("c:\test.bmp")
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try

        CrystalReportViewer1.ReportSource = rpt
        CrystalReportViewer1.Show()


The first error message I get (generated by the sect.reportobjects.item... line) is simply 'Access is denied'.

The second (generated by crystalreportviewer1.reportsource... line) is 'Invalid Report Source'.

I would really appreciate if anyone can solve these.

[Edited by dreamtime on 23-05-2005 at 10:21 AM GMT]

23-05-2005 at 10:18 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : Reporting tools : vb.net
Previous Topic (APPlication denied or object defiend error in RDC)Next Topic (A problem with Cross-tab) 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