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?
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
-------
:) :) :)
Re: CR 11 connection question...
:wave:
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!