Crystal Report - PASAR CADENA DE CONEXION A CR DESDE VB.NET

 
Vista:

PASAR CADENA DE CONEXION A CR DESDE VB.NET

Publicado por Roberto (5 intervenciones) el 27/01/2005 00:04:25
Estoy migrando una aplicación, la cual llamo a ciertos reportes y en VB 6 le pasaba la cadena de conexión para SQL para que no me apareciera el cuadrito pidiendo esa información. El problema es que en VB.NET esto cambió y no encuentro como pasarle el Servidor, Usuario y Clave al CR para mostrarlo, en VB6 era algo así como: cr.Connect = "Server=Servidor, USR ID=sa, PSW = dddd".

Alguien tiene algun ejemplo de como desaparecer este molesto cuadrito cuando inicia el Reporte ????

Desde ya muchas gracias por las posibles soluciones, Rto.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:PASAR CADENA DE CONEXION A CR DESDE VB.NET

Publicado por Gerardo (571 intervenciones) el 27/01/2005 04:05:59
Ke tal Roberto.
Intenta lo siguiente:

Private tbCurrent As CrystalDecisions.CrystalReports.Engine.Table
Private tliCurrent As CrystalDecisions.Shared.TableLogOnInfo
Private rptDoc As New ReportDocument

For Each tbCurrent In rptDoc.Database.Tables
tliCurrent = tbCurrent.LogOnInfo
With tliCurrent.ConnectionInfo
.ServerName = ServerName
.UserID = UserID
.Password = Password
.DatabaseName = DatabaseName
End With
tbCurrent.ApplyLogOnInfo(tliCurrent)
tbCurrent.Location = DatabaseName & ".dbo." & tbCurrent.Name
Next tbCurrent

Saludos
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
1
Comentar

RE:PASAR CADENA DE CONEXION A CR DESDE VB.NET

Publicado por Roberto (5 intervenciones) el 27/01/2005 21:48:24
FUNCIONO IMPECABLE !!! 1000 GRACIAS !!!
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar