Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connection string
Message
From
03/11/2005 19:34:14
Joel Casse
Bishops University
Lennoxville, Quebec, Canada
 
 
To
All
General information
Forum:
ASP.NET
Category:
Reporting
Title:
Connection string
Environment versions
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01065301
Message ID:
01065301
Views:
66
Hi!

I want to change the connection string when I run a report because I build the reports with my SQL Server but when I want to deliver it to the client I want to point to there SQL Server. I have to code bellow but it doesn't work. Any ideas?

Thanks Joel :)

Dim crlLogonInfos As New CrystalDecisions.Shared.TableLogOnInfos
Dim crlLogonInfo As New CrystalDecisions.Shared.TableLogOnInfo
Dim crlConnectionInfo As New CrystalDecisions.Shared.ConnectionInfo

With crlConnectionInfo
.ServerName = "SQL"
.IntegratedSecurity = True
.DatabaseName = "PolyMatrice"
End With
'rptMat.Database.Tables(0).LogOnInfo.ConnectionInfo.IntegratedSecurity = True
'rptMat.Database.Tables(0).LogOnInfo.ConnectionInfo.ServerName =
'rptMat.Database.Tables(0).ApplyLogOnInfo()
crlLogonInfo.ConnectionInfo = crlConnectionInfo
crlLogonInfo.TableName = "Matrice"
crlLogonInfos.Add(crlLogonInfo)
Dim tbl As Table
Cursor.Current = Cursors.WaitCursor
Dim frmMatPreview As New frmReportViewer(rptMat)
frmMatPreview.crvPreview.LogOnInfo = crlLogonInfos
Next
Reply
Map
View

Click here to load this message in the networking platform