Problemas para imprimir Cajas de texto en un reporte con visual 6
Publicado por juan (1 intervención) el 15/04/2011 17:58:06
Hola, hace poco empeze a integrar crystal report XI con visual 6 y necesitaba hacer que los informes que programaba en visual se imprimieran, asi q empese a diseñarlos en crystal para poder imprimirlos, pero al tirar a imprimir me sale error que dice que no reconoce los elementos en crystal y estan tal cual el informe en visual 6, este es el codigo que uso para conectar visual 6 con crystal report:
Public Sub Imprimir()
Dim Print1 As Printer
Dim Report As New REP_RC_H_120
Dim SQL_Consulta As String
SQL_Consulta = "SELECT " _
& "hoja_registro.id_solicitud_trabajo, " _
& "informe_final.id_informe_final, " _
& "contratista.nombre_o_razon_social as contratista, mandante.nombre_o_razon_social as mandante, " _
& "obra.descripcion, CONCAT(obra.direccion, ', ', localidad_obra.nombre) AS direccion_obra, " _
& "cliente.nombre_o_razon_social, CONCAT(cliente.direccion, ', ', localidad_cliente.nombre) AS direccion_cliente, " _
& "ingreso_muestra.codigo_muestra_cliente, CONCAT(solicitud_trabajo.numero,'/',mid(year( solicitud_trabajo.fecha),3,2)) as NST, " _
& "muestreado_por.nombre, laboratorista.nombre_o_razon_social as laboratorista, " _
& "ingreso_muestra.lugar_muestreo, solicitud_trabajo.fecha_inicio, " _
& "informe_final.fecha " _
& "FROM hoja_registro " _
& "INNER JOIN informe_final ON (hoja_registro.id_hoja_registro = informe_final.id_hoja_registro) " _
& "INNER JOIN orden_trabajo ON (hoja_registro.id_hoja_registro = orden_trabajo.id_hoja_registro) " _
& "INNER JOIN solicitud_ensayo ON (orden_trabajo.id_solicitud_ensayo = solicitud_ensayo.id_solicitud_ensayo) " _
& "INNER JOIN ingreso_muestra ON (orden_trabajo.id_ingreso_muestra = ingreso_muestra.id_ingreso_muestra) " _
& "INNER JOIN muestreado_por ON (ingreso_muestra.id_muestreado_por = muestreado_por.id_muestreado_por) " _
& "LEFT OUTER JOIN entidad laboratorista ON (ingreso_muestra.id_entidad_laboratorista = laboratorista.id_entidad) " _
& "INNER JOIN solicitud_trabajo ON (solicitud_ensayo.id_solicitud_trabajo = solicitud_trabajo.id_solicitud_trabajo) " _
& "INNER JOIN obra ON (solicitud_trabajo.id_obra = obra.id_obra) " _
& "INNER JOIN entidad cliente ON (solicitud_trabajo.id_entidad = cliente.id_entidad) " _
& "LEFT OUTER JOIN entidad contratista ON (obra.id_entidad_contratista = contratista.id_entidad) " _
& "LEFT OUTER JOIN entidad mandante ON (obra.id_entidad_mandante = mandante.id_entidad) " _
& "INNER JOIN localidad localidad_obra ON (obra.id_localidad = localidad_obra.id_localidad) " _
& "INNER JOIN localidad localidad_cliente ON (cliente.id_localidad = localidad_cliente.id_localidad) " _
& "WHERE informe_final.id_informe_final='" & Id_Clave_Primaria & "'"
Dim intPageSize As Integer
Dim intPageOrient As Integer
intPageSize = Report.PaperSize
intPageOrient = Report.PaperOrientation
Report.PaperSize = intPageSize
Report.PaperOrientation = intPageOrient
If TG_NULO(CMB_Impresion.text) = False Then
Report.Database.SetDataSource TG_CargaTabla_DB(SQL_Consulta)
Report.TXT_Resultado_Identificacion_1.SetText TXT_Resultado_Identificacion_1
Report.TXT_Fecha_Muestreo_1.SetText TXT_Fecha_Muestreo_1
Report.TXT_Fecha_Muestreo_2.SetText TXT_Fecha_Muestreo_2
Report.TXT_Fecha_Muestreo_3.SetText TXT_Fecha_Muestreo_3
Report.TXT_Fecha_Muestreo_4.SetText TXT_Fecha_Muestreo_4
Report.TXT_Fecha_Muestreo_5.SetText TXT_Fecha_Muestreo_5
Set Print1 = Mod_Seleccion_Impresora(CMB_Impresion.text)
Report.SelectPrinter Print1.DriverName, Print1.DeviceName, Print1.Port
Report.PrintOut False
DoEvents
Else
TG_Mensaje_TxT "Seleccione la Impresora", False
SetFocus
CMB_Impresion.SetFocus
End If
End Sub
Me dice que no reconoce txt_fecha_muestro 2 hasta la 5 al querer imprimir, y estan con caja de texto en el mismo reporte tanto en visual como crystal, por favor cualquier ayuda la agradeceria mucho
Public Sub Imprimir()
Dim Print1 As Printer
Dim Report As New REP_RC_H_120
Dim SQL_Consulta As String
SQL_Consulta = "SELECT " _
& "hoja_registro.id_solicitud_trabajo, " _
& "informe_final.id_informe_final, " _
& "contratista.nombre_o_razon_social as contratista, mandante.nombre_o_razon_social as mandante, " _
& "obra.descripcion, CONCAT(obra.direccion, ', ', localidad_obra.nombre) AS direccion_obra, " _
& "cliente.nombre_o_razon_social, CONCAT(cliente.direccion, ', ', localidad_cliente.nombre) AS direccion_cliente, " _
& "ingreso_muestra.codigo_muestra_cliente, CONCAT(solicitud_trabajo.numero,'/',mid(year( solicitud_trabajo.fecha),3,2)) as NST, " _
& "muestreado_por.nombre, laboratorista.nombre_o_razon_social as laboratorista, " _
& "ingreso_muestra.lugar_muestreo, solicitud_trabajo.fecha_inicio, " _
& "informe_final.fecha " _
& "FROM hoja_registro " _
& "INNER JOIN informe_final ON (hoja_registro.id_hoja_registro = informe_final.id_hoja_registro) " _
& "INNER JOIN orden_trabajo ON (hoja_registro.id_hoja_registro = orden_trabajo.id_hoja_registro) " _
& "INNER JOIN solicitud_ensayo ON (orden_trabajo.id_solicitud_ensayo = solicitud_ensayo.id_solicitud_ensayo) " _
& "INNER JOIN ingreso_muestra ON (orden_trabajo.id_ingreso_muestra = ingreso_muestra.id_ingreso_muestra) " _
& "INNER JOIN muestreado_por ON (ingreso_muestra.id_muestreado_por = muestreado_por.id_muestreado_por) " _
& "LEFT OUTER JOIN entidad laboratorista ON (ingreso_muestra.id_entidad_laboratorista = laboratorista.id_entidad) " _
& "INNER JOIN solicitud_trabajo ON (solicitud_ensayo.id_solicitud_trabajo = solicitud_trabajo.id_solicitud_trabajo) " _
& "INNER JOIN obra ON (solicitud_trabajo.id_obra = obra.id_obra) " _
& "INNER JOIN entidad cliente ON (solicitud_trabajo.id_entidad = cliente.id_entidad) " _
& "LEFT OUTER JOIN entidad contratista ON (obra.id_entidad_contratista = contratista.id_entidad) " _
& "LEFT OUTER JOIN entidad mandante ON (obra.id_entidad_mandante = mandante.id_entidad) " _
& "INNER JOIN localidad localidad_obra ON (obra.id_localidad = localidad_obra.id_localidad) " _
& "INNER JOIN localidad localidad_cliente ON (cliente.id_localidad = localidad_cliente.id_localidad) " _
& "WHERE informe_final.id_informe_final='" & Id_Clave_Primaria & "'"
Dim intPageSize As Integer
Dim intPageOrient As Integer
intPageSize = Report.PaperSize
intPageOrient = Report.PaperOrientation
Report.PaperSize = intPageSize
Report.PaperOrientation = intPageOrient
If TG_NULO(CMB_Impresion.text) = False Then
Report.Database.SetDataSource TG_CargaTabla_DB(SQL_Consulta)
Report.TXT_Resultado_Identificacion_1.SetText TXT_Resultado_Identificacion_1
Report.TXT_Fecha_Muestreo_1.SetText TXT_Fecha_Muestreo_1
Report.TXT_Fecha_Muestreo_2.SetText TXT_Fecha_Muestreo_2
Report.TXT_Fecha_Muestreo_3.SetText TXT_Fecha_Muestreo_3
Report.TXT_Fecha_Muestreo_4.SetText TXT_Fecha_Muestreo_4
Report.TXT_Fecha_Muestreo_5.SetText TXT_Fecha_Muestreo_5
Set Print1 = Mod_Seleccion_Impresora(CMB_Impresion.text)
Report.SelectPrinter Print1.DriverName, Print1.DeviceName, Print1.Port
Report.PrintOut False
DoEvents
Else
TG_Mensaje_TxT "Seleccione la Impresora", False
SetFocus
CMB_Impresion.SetFocus
End If
End Sub
Me dice que no reconoce txt_fecha_muestro 2 hasta la 5 al querer imprimir, y estan con caja de texto en el mismo reporte tanto en visual como crystal, por favor cualquier ayuda la agradeceria mucho
Valora esta pregunta


0