CRYSTAL & V.B 6.0
Publicado por david (7 intervenciones) el 29/04/2005 22:26:25
ESTE ES MI CODIGO
Dim Etiqueta As Variant
Dim SERVER_SQL As String
Dim BD As String
Dim user_sql As String
Dim pwd_sql As String
SERVER_SQL = "ABRAHAM"
BD = "Gobcan ya con las relaciones 25 de enero 2005SQL"
user_sql = "USUARIO"
pwd_sql = "1234"
Etiqueta = 1
Screen.MousePointer = vbHourglass
Set Report = crapp.OpenReport(App.Path & "\Report2.rpt", 1)
Report.Database.Tables(1).SetLogOnInfo SERVER_SQL, BD, user_sql, pwd_sql
Report.RecordSelectionFormula = "{usuario_gobcan.id_sexo} = " & Etiqueta ' esto como se utiliza
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
CRViewer1.EnableRefreshButton = True
Screen.MousePointer = vbDefault
EL ERRO QUE ME DA ES CRViewer1.ViewReport Y DICE "ERROR ODBC MICROSOF ADMINISDRADOR DE CONTROLADORES ODBC CONEXION NO ABIERTA
SI ALGUIEN SABE CUAL ES EL ERROR
GRACIAS
Dim Etiqueta As Variant
Dim SERVER_SQL As String
Dim BD As String
Dim user_sql As String
Dim pwd_sql As String
SERVER_SQL = "ABRAHAM"
BD = "Gobcan ya con las relaciones 25 de enero 2005SQL"
user_sql = "USUARIO"
pwd_sql = "1234"
Etiqueta = 1
Screen.MousePointer = vbHourglass
Set Report = crapp.OpenReport(App.Path & "\Report2.rpt", 1)
Report.Database.Tables(1).SetLogOnInfo SERVER_SQL, BD, user_sql, pwd_sql
Report.RecordSelectionFormula = "{usuario_gobcan.id_sexo} = " & Etiqueta ' esto como se utiliza
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
CRViewer1.EnableRefreshButton = True
Screen.MousePointer = vbDefault
EL ERRO QUE ME DA ES CRViewer1.ViewReport Y DICE "ERROR ODBC MICROSOF ADMINISDRADOR DE CONTROLADORES ODBC CONEXION NO ABIERTA
SI ALGUIEN SABE CUAL ES EL ERROR
GRACIAS
Valora esta pregunta
0