Results 1 to 3 of 3

Thread: CR 11 connection question...

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2001
    Location
    Mass USA
    Posts
    1,674

    CR 11 connection question...

    Is there a way to add a connection string to CR instead of using a ODBC connection? I am using SQL Server authentication and for some reason the password will not store in my odbc connection, therefore everytime I run a report there is a prompt asking for login information.

    Anyone got any ideas?

  2. #2
    New Member lheo15750's Avatar
    Join Date
    May 2006
    Location
    Philippines
    Posts
    7

    Re: CR 11 connection question...

    hi

    i don't know the version of VB that you use but i face the same problem until yesterday. setting up the connection properties of your report will solve the problem.

    i'll give you my code and i hope it will help!!!

    by the way i'm using vb.net 2003 and CR XI.
    i'm also using CRAXDDRT.

    here is my code...

    --------

    Dim grp As New CRAXDDRT.Report
    Dim capp As New CRAXDDRT.Application

    Private Sub frmMyReport_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    Try

    grp = capp.OpenReport("..\MyReport.rpt")

    With grp.Database.Tables(1).ConnectionProperties

    'Here are the connection properties

    DeleteAll()
    .Add("Provider", "<yourProvider>")
    .Add("Data Source", "<yourDataSource>")
    .Add("Initial Catalog", "<yourTable>")
    .Add("User ID", "<yourUserID>")
    .Add("Password", "<yourPassword>")
    End With

    crv1.ReportSource = grp
    crv1.ViewReport()

    Catch ex As Exception

    MsgBox(Err.Number & Chr(13) & ex.Message)

    End Try

    End Sub


    -------


  3. #3
    New Member
    Join Date
    May 2006
    Posts
    1

    Re: CR 11 connection question...




    I'm using similar code, but I keep getting and error message on the OpenReport line:

    run-time error '-2147206463 (80043ac1)'

    Any ideas?

    Also, can you tell me what the difference is between using CRAXDRT and using CRAXDDRT?

    If anyone knows of any website where good documentation can be found on the coding differences between CR11 and CR7 from VB, I would appreciate it.

    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width