hola a todos, si alguien me puede ayudar con lo sgte, por favor...
El asunto es que tengo un reporte que me funciona bien, uso un procsedimiento almacenado con parametros y el reporte lo muestra bien, el problema parte cuando quiero levantar el reporte en el servidor de produccion, ya que el reporte lo hice con el servidor de desarrollo, el reporte al levantarse me pide los campos de conexion, servidor, nombre base de datos, usuario y password.
La conexion a la base se datos la realizo asi:
'-------------------------------------------------------------------
'- ESTABLE LOS PARAMETROS DE CONEXION A LA BASE DE DATOS
'-------------------------------------------------------------------
Dim Logueo As New TableLogOnInfo
Dim _Logueos As New TableLogOnInfos
Dim obj_conexion As Cls_Conexion
Dim Str_Conexion As String
obj_conexion = New Cls_Conexion
obj_conexion.Abrir()
Str_Conexion = obj_conexion.Conexion.ConnectionString
Logueo.ConnectionInfo.AllowCustomConnection = True
Logueo.ConnectionInfo.ServerName = obj_conexion.ServerName
Logueo.ConnectionInfo.UserID = obj_conexion.UserID
Logueo.ConnectionInfo.Password = obj_conexion.Password
Logueo.ConnectionInfo.DatabaseName = obj_conexion.DatabaseName
_Logueos.Add(Logueo)
obj_conexion.Cerrar()
obj_conexion = Nothing
CRV_Reporte.LogOnInfo = _Logueos
Reporte_Resultado.Load(Me.Server.MapPath("Reporte_ Principal.rpt"))
CRV_Reporte.AutoDataBind = True
CRV_Reporte.ReportSource = Reporte_Resultado
CRV_Reporte.DataBind()
CRV_Reporte.PageZoomFactor = 100
tambien lo he intentado de esta forma:
obj_conexion = New Cls_Conexion
obj_conexion.Abrir()
Str_Conexion = obj_conexion.Conexion.ConnectionString
rptservidor = obj_conexion.ServerName
rptlogin = obj_conexion.UserID
rptpassword = obj_conexion.Password
rptnombd = obj_conexion.DatabaseName
Reporte_ResultadoRestricciones.Load(Me.Server.MapP ath("Reporte_Principal.rpt"), OpenReportMethod.OpenReportByTempCopy)
Reporte_Resultado.Database.Tables.Item("pa_Reporte _Resultado;1").LogOnInfo.ConnectionInfo.ServerName = obj_conexion.ServerName
Reporte_Resultado.Database.Tables.Item("pa_Reporte _Resultado;1").LogOnInfo.ConnectionInfo.Password = obj_conexion.Password
Reporte_Resultado.Database.Tables.Item("pa_Reporte _Resultado;1").LogOnInfo.ConnectionInfo.UserID = obj_conexion.UserID
Reporte_Resultado.Database.Tables.Item("pa_Reporte _Resultado;1").LogOnInfo.ConnectionInfo.DatabaseNa me = obj_conexion.DatabaseName
'PARAMETROS
Reporte_Resultado.SetParameterValue("@ID_PROCESO", Id_Proceso)
Reporte_Resultado.SetParameterValue("@ID_CUENTA", Id_Cuenta)
Reporte_Resultado.SetParameterValue("@ID_PERFIL", Id_Perfil)
' CAMBIA LA CONEXION DE LA BASE DE DATOS
Dim crTables As CrystalDecisions.CrystalReports.Engine.Tables
Dim crTable As CrystalDecisions.CrystalReports.Engine.Table
Dim crConnInfo As New CrystalDecisions.Shared.ConnectionInfo
Dim crLogOnInfo As CrystalDecisions.Shared.TableLogOnInfo
crTables = Reporte_Resultado.Database.Tables
For Each crTable In crTables
crConnInfo.DatabaseName = rptnombd
crConnInfo.ServerName = rptservidor
crConnInfo.UserID = rptlogin
crConnInfo.Password = rptpassword
crLogOnInfo = crTable.LogOnInfo
crLogOnInfo.ConnectionInfo = crConnInfo
crTable.ApplyLogOnInfo(crLogOnInfo)
Next
CRV_Reporte.ReportSource = Reporte_Resultado
CRV_Reporte.DataBind()
Pero de esta forma me diceque no estoy pasando los parametros, me manda este error:
Failed to open a rowset. Details: ADO Error Code: 0x Source: Microsoft OLE DB Provider for SQL Server Description: El procedimiento 'pa_Reporte_Resultado' precisa el parámetro '@ID_PROCESO', que no se ha especificado. SQL State: 42000 Native Error: Failed to open a rowset
alguna idea... ?
algo que no este considerando ?
por favor... cualquier idea podria ayudar...
Muchas GRacias