Visual Basic.NET - URGENTE

 
Vista:

URGENTE

Publicado por RICARDO MANCILLA (23 intervenciones) el 12/08/2008 21:58:21
HOLA AMIGOS DE LWP

ESTOY TRABAJANDO CON VB2005, BD ACCESS, NO SE CUAL ES LA VERSION DE CRYSTAL REPORTS, ES LA Q VIENE INCLUIDA CON EL CD DE VS2005

LA APLICACION Q ESTOY CREANDO ES PARA AYUDAR UN POCO A LOS COLEGIOS A MANEJAR O CONTROLAR LOS LOGROS Q APRUEBAN O REPRUEBAN LOS ALUMNOS, LA IMPRESION ES LO Q LLAMAMOS "EL BOLETIN DE CALIFICACIONES", ESTOY TRATANDO DE CREAR SUBREPORTES, LE PASO LOS PARAMETROS, HASTA AHI NO HAY PROBLEMA, EL PROBLEMA ES Q EN EL CODIGO Q TENGO SOLO PUEDO ESTABLECERLE AL REPORTVIEWER UN(1) REPORTE, PERO NO ME TOMA LOS SUBREPORTES Q LE TENGO, ENTONCES SOLO ME SALEN LOS DATOS DEL REPORTE PRINCIPAL Y LOS DE LOS SUBREPORTES NO ME SALEN.

LOS SUBREPORTES LOS TOMO DE UN REPORTE YA CREADO, EJ: EL ENCABEZADO LO TOMO DE UN REPORTE LLAMADO "ENCABEZADO.RPT" QUE SOLO ME MUESTRA LOS DATOS DEL COLEGIO, ASI COMO LOS DATOS DEL ALUMNO EN UNO Q SE LLAMA "ALUMNO.RPT"

A LOS SUBREPORTES LES PASO LOS PARAMETROS Y ME LOS TOMAN BIEN (ME DOY CUENTA EN LA EJECUCION PASO A PASO) PERO NO ME SALEN EN LA IMPRESION.

AHI LES VA UN POCO DEL CODIGO Q UTILIZO EN EL EVENTO LOAD DEL FORMULARIO Q TIENE EL REPORTVIEWER

Dim con As New OleDbConnection
Dim ds As New DataSet
Dim da As New OleDbDataAdapter
Dim da2 As New OleDbDataAdapter
Dim dt As New DataTable
Dim dt2 As New DataTable
Dim comando As New OleDbCommand
Dim comando2 As New OleDbCommand
Dim reporte As New BOLETIN1 ' ESTE ES PARA EL REPORTE PRINCIPAL
Dim SR As New ALUMNO ' ESTE ES PARA EL SUBREPORTE
dt.Clear()
dt2.Clear()
Dim conn As String = home.OBJ.conexion.ConnectionString.ToString
con = New OleDbConnection(conn)
comando.Connection = con
comando.CommandText = "SQL DEL REPORTE PRINCIPAL"
comando2.Connection = con
comando2.CommandText = "SQL DEL SUBREPORTE ALUMNO"
da = New OleDbDataAdapter(comando)
da2 = New OleDbDataAdapter(comando2)
da.Fill(dt)
da2.Fill(dt2)
reporte.SetDataSource(dt)
SR.SetDataSource(dt2)
reporte.Refresh()
CrystalReportViewer1.ReportSource = SR
CrystalReportViewer1.ReportSource = reporte
CrystalReportViewer1.Refresh()

ESPERO ALGUIEN ME PUEDA AYUDAR, CREANME Q LE ESTARIA ETERNAMENTE AGRADECIDO.
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
sin imagen de perfil

RE:URGENTE

Publicado por P. J. (706 intervenciones) el 13/08/2008 00:10:20
Asi con asignacion de datos de esa forma, no sabria decirte exactamente que haces mal.

Creo que en estos casos mejor invocar al SP desde el reporte, luego al insertarlo en el reporte principal solo vincularias los parametros.

Ojala lo soluciones.

P.D: Cuando uno escribe en mayuscula en los foros, da la impresion que estuvieras gritando de igual manera escribir algo muy extenso se hace aburrido leer (sin ofender), yo me interese solo porque vi subreport. :D

Salu2.
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