gambas 2.19
tengo el siguiente problema al mandar a mostrar la fecha en el reporte que ha introducido el usuario a traves del calendario en el valuebox no se muestra cuando lo mando a imprimir ojo este fue configurado tipo date en sus propiedades
los que no mustran nada son:
txtfecha.Day
txtfecha.Month
txtfecha.Year
tampoco me muestra anio_esc
por favor ayudenme a ver el error que tengo porque de verdad creo que ya no me doy cuenta cual es???
Gracias de antemano por la ayuda que me puedan brindar
' gambas class file
PUBLIC SUB Form_Open()
ME.Center
IF ModConexion.conexion() THEN
ELSE
message.Error("Error en la conexion")
ENDIF
END
PUBLIC SUB btnsalir_Click()
ME.Close
END
PRIVATE FUNCTION Solo_Numeros(KeyTecla AS Integer)
IF KeyTecla >= 48 AND KeyTecla <= 57 OR KeyTecla = 4099 OR KeyTecla = 4103 THEN
ELSE
STOP EVENT
END IF
END
PUBLIC SUB anio_esc_KeyPress()
Solo_Numeros(Key.Code)
IF (Len(anio_esc.Text)) >= 9 THEN
STOP EVENT
ENDIF
IF Key.code = Key.enter OR Key.code = Key.Return OR Key.CODE = Key.TAB THEN
END IF
END
PUBLIC SUB btnborrar5_Click()
textcedulaA.Text = ""
END
PUBLIC SUB btnborrar1_Click()
anio_esc.Text = ""
END
PUBLIC SUB btnborrar4_Click()
txtfecha.Text = ""
END
PUBLIC SUB Calendario_Change()
txtfecha.Value = Calendario.Day & "/" & Calendario.Month & "/" & Calendario.Year
END
PUBLIC SUB btnaddfecha_Click()
Calendario.Raise() 'El metodo Raise envia el control al frente del contenedor
Calendario.Show() 'El metodo Show nos muestra el control
END
PUBLIC SUB btncerrarcalendario_Click()
Calendario.Hide
END
PUBLIC SUB btngenerar_Click()
DIM filtro AS String
ModConexion.rs1 = ModConexion.db.Exec("SELECT * FROM alumnos where cedula_alumno like '" & textcedulaA.Text & "'")
IF txtfecha.Value <> "" THEN
IF textcedulaA.Text = "" THEN
Message.Info("Por favor introduzca el numero de" & "\n" & "cédula para realizar la búsqueda")
ClearField()
RETURN
ELSE IF ModConexion.rs1.Available = TRUE THEN
filtro = textcedulaA.Text
ModConexion.rs1 = ModConexion.db.Exec("Select * from alumnos where cedula_alumno like '" & filtro & "'")
textcedulaA.Text = ModConexion.rs1["cedula_alumno"]
frmreportebuenaconducta.buena_conducta()
frmreportebuenaconducta1.close
RETURN
ELSE
Message.Info("La cédula: " & textcedulaA.Text & "\n" & "no se encuentra en la base de datos" "\n" "intente otro numero")
textcedulaA.Clear
ENDIF
ELSE
Message.Warning("Hay uno o más campos vacios debe \n introducir todos los datos solicitados")
ENDIF
END
PUBLIC SUB TextcedulaA_KeyPress()
Solo_Numeros(Key.Code)
IF (Len(textcedulaA.Text)) >= 8 THEN
STOP EVENT
ENDIF
END
PUBLIC SUB ClearField()
textcedulaA.SetFocus
textcedulaA.Clear
END
PUBLIC FUNCTION buena_conducta()
DIM Reporte AS File
DIM Contador AS Integer = 0
DIM captura AS Integer
ModConexion.rs1 = ModConexion.db.Exec("SELECT * FROM alumnos where cedula_alumno like" & "'" & textcedulaA.Text & "%" & "'")
ModConexion.rs2 = ModConexion.db.Exec("select * from propiedades_liceo where cedula_director")
ModConexion.rs1.MoveFirst
captura = ModConexion.rs1.Count
OPEN "~/gambas2/liceopiotamayo/buena_conducta.html" FOR CREATE AS #Reporte
PRINT #Reporte, "<html> <center>"
PRINT #Reporte, " <head><title>Carta de Buena Conducta - Creadores: Luis Espinoza, Kesia Mendoza -</title> "
PRINT #Reporte, " <body topmargin = '2' leftmargin='2'>"
PRINT #Reporte, "<table align = 'left' width = 600 border = '0'>"
PRINT #Reporte, "<tr>"
PRINT #Reporte, "<td <img src=\"logo1.PNG\"></td>"
PRINT #Reporte, "<td <i><font size=3 align=center>República Bolivariana de Venezuela"
PRINT #Reporte, " <p><i><font size=3 align=center>Ministerio del Poder Popular para la Educación"
PRINT #Reporte, " <p><i><font size=3 align=center>Unidad Educativa Pio Tamayo</td>"
PRINT #Reporte, "</tr>"
PRINT #Reporte, " </table>"
PRINT #Reporte, " <br>"
PRINT #Reporte, " <br>"
PRINT #Reporte, " <br>"
PRINT #Reporte, " <br>"
PRINT #Reporte, " <br>"
PRINT #Reporte, " <br>"
PRINT #Reporte, " <br>"
PRINT #Reporte, " <br>"
PRINT #Reporte, " <caption><h2>Carta de Buena Conducta</h2></caption>"
PRINT #Reporte, " <pre><tr>"
PRINT #Reporte, " <p><i><font size=5> Quien suscribe ciudadano director(a) de la U.E.PIO "
PRINT #Reporte, " <p><i><font size=5>TAMAYO Lic. " & ModConexion.rs2!nombre_D & " " & ModConexion.rs2!apellido_D & " portador(a)de la C.I: " & ModConexion.rs2!cedula_director & ""
PRINT #Reporte, " <p><i><font size=5> Hace constar por medio de la presente que el alumno(a) " & ModConexion.rs1!nombreA & " " & ModConexion.rs1!apellidoA & ""
PRINT #Reporte, " <p><i><font size=5> C.I: " & ModConexion.rs1!cedula_alumno & " curso el " & ModConexion.rs1!anio_cursar & " Año de Educacion Diversificada Mencion"
PRINT #Reporte, " <p><i><font size=5> Ciencias en nuestra institucion en el año escolar " & anio_esc.Text & ", mostrando una buena "
PRINT #reporte, " <p><i><font size=5> conducta durante la permanencia en la institucion."
PRINT #Reporte, " <tr>"
PRINT #Reporte, " <tr>"
PRINT #Reporte, " <tr>"
PRINT #Reporte, " <p><i><font size=5> Constancia que se expide por la parte interesada a los " & txtfecha.Day & " dias "
PRINT #Reporte, " <p><i><font size=5> del mes de " & txtfecha.Month & " del " & txtfecha.Year & "."
PRINT #Reporte, " <tr>"
PRINT #Reporte, " <tr>"
PRINT #Reporte, " <tr>"
PRINT #Reporte, " <p><i><font size=5> LIC. " & ModConexion.rs2!nombre_D & " " & ModConexion.rs2!apellido_D & " "
PRINT #Reporte, " <p><i><font size=5> DIRECTOR(a) "
PRINT #Reporte, " </center>"
ModConexion.rs1.MoveNext
DEC captura
PRINT #Reporte, " </table>"
PRINT #Reporte, " <hr>"
PRINT #Reporte, " <form>"
PRINT #Reporte, " <center>"
PRINT #Reporte, " <input type='button' value='Imprimir' OnClick='window.print()'>"
PRINT #Reporte, " <input type='button' value='Cerrar' OnClick='window.close();'>"
PRINT #Reporte, " </center>"
PRINT #Reporte, "</form>"
PRINT #Reporte, " </body>"
PRINT #Reporte, "</html>"
CLOSE #Reporte
EXEC ["firefox", "~/gambas2/liceopiotamayo/buena_conducta.html"]
END
PUBLIC SUB Form_Open()
ME.Center
IF ModConexion.conexion() THEN
ELSE
message.Error("Error en la conexion")
ENDIF
END
PUBLIC SUB btnsalir_Click()
ME.Close
END
PRIVATE FUNCTION Solo_Numeros(KeyTecla AS Integer)
IF KeyTecla >= 48 AND KeyTecla <= 57 OR KeyTecla = 4099 OR KeyTecla = 4103 THEN
ELSE
STOP EVENT
END IF
END
PUBLIC SUB anio_esc_KeyPress()
Solo_Numeros(Key.Code)
IF (Len(anio_esc.Text)) >= 9 THEN
STOP EVENT
ENDIF
IF Key.code = Key.enter OR Key.code = Key.Return OR Key.CODE = Key.TAB THEN
END IF
END
PUBLIC SUB btnborrar5_Click()
textcedulaA.Text = ""
END
PUBLIC SUB btnborrar1_Click()
anio_esc.Text = ""
END
PUBLIC SUB btnborrar4_Click()
txtfecha.Text = ""
END
PUBLIC SUB Calendario_Change()
txtfecha.Value = Calendario.Day & "/" & Calendario.Month & "/" & Calendario.Year
END
PUBLIC SUB btnaddfecha_Click()
Calendario.Raise() 'El metodo Raise envia el control al frente del contenedor
Calendario.Show() 'El metodo Show nos muestra el control
END
PUBLIC SUB btncerrarcalendario_Click()
Calendario.Hide
END
PUBLIC SUB btngenerar_Click()
DIM filtro AS String
ModConexion.rs1 = ModConexion.db.Exec("SELECT * FROM alumnos where cedula_alumno like '" & textcedulaA.Text & "'")
IF txtfecha.Value <> "" THEN
IF textcedulaA.Text = "" THEN
Message.Info("Por favor introduzca el numero de" & "\n" & "cédula para realizar la búsqueda")
ClearField()
RETURN
ELSE IF ModConexion.rs1.Available = TRUE THEN
filtro = textcedulaA.Text
ModConexion.rs1 = ModConexion.db.Exec("Select * from alumnos where cedula_alumno like '" & filtro & "'")
textcedulaA.Text = ModConexion.rs1["cedula_alumno"]
frmreportebuenaconducta.buena_conducta()
frmreportebuenaconducta1.close
RETURN
ELSE
Message.Info("La cédula: " & textcedulaA.Text & "\n" & "no se encuentra en la base de datos" "\n" "intente otro numero")
textcedulaA.Clear
ENDIF
ELSE
Message.Warning("Hay uno o más campos vacios debe \n introducir todos los datos solicitados")
ENDIF
END
PUBLIC SUB TextcedulaA_KeyPress()
Solo_Numeros(Key.Code)
IF (Len(textcedulaA.Text)) >= 8 THEN
STOP EVENT
ENDIF
END
PUBLIC SUB ClearField()
textcedulaA.SetFocus
textcedulaA.Clear
END
PUBLIC FUNCTION buena_conducta()
DIM Reporte AS File
DIM Contador AS Integer = 0
DIM captura AS Integer
ModConexion.rs1 = ModConexion.db.Exec("SELECT * FROM alumnos where cedula_alumno like" & "'" & textcedulaA.Text & "%" & "'")
ModConexion.rs2 = ModConexion.db.Exec("select * from propiedades_liceo where cedula_director")
ModConexion.rs1.MoveFirst
captura = ModConexion.rs1.Count
OPEN "~/gambas2/liceopiotamayo/buena_conducta.html" FOR CREATE AS #Reporte
PRINT #Reporte, "<html> <center>"
PRINT #Reporte, " <head><title>Carta de Buena Conducta - Creadores: Luis Espinoza, Kesia Mendoza -</title> "
PRINT #Reporte, " <body topmargin = '2' leftmargin='2'>"
PRINT #Reporte, "<table align = 'left' width = 600 border = '0'>"
PRINT #Reporte, "<tr>"
PRINT #Reporte, "<td <img src=\"logo1.PNG\"></td>"
PRINT #Reporte, "<td <i><font size=3 align=center>República Bolivariana de Venezuela"
PRINT #Reporte, " <p><i><font size=3 align=center>Ministerio del Poder Popular para la Educación"
PRINT #Reporte, " <p><i><font size=3 align=center>Unidad Educativa Pio Tamayo</td>"
PRINT #Reporte, "</tr>"
PRINT #Reporte, " </table>"
PRINT #Reporte, " <br>"
PRINT #Reporte, " <br>"
PRINT #Reporte, " <br>"
PRINT #Reporte, " <br>"
PRINT #Reporte, " <br>"
PRINT #Reporte, " <br>"
PRINT #Reporte, " <br>"
PRINT #Reporte, " <br>"
PRINT #Reporte, " <caption><h2>Carta de Buena Conducta</h2></caption>"
PRINT #Reporte, " <pre><tr>"
PRINT #Reporte, " <p><i><font size=5> Quien suscribe ciudadano director(a) de la U.E.PIO "
PRINT #Reporte, " <p><i><font size=5>TAMAYO Lic. " & ModConexion.rs2!nombre_D & " " & ModConexion.rs2!apellido_D & " portador(a)de la C.I: " & ModConexion.rs2!cedula_director & ""
PRINT #Reporte, " <p><i><font size=5> Hace constar por medio de la presente que el alumno(a) " & ModConexion.rs1!nombreA & " " & ModConexion.rs1!apellidoA & ""
PRINT #Reporte, " <p><i><font size=5> C.I: " & ModConexion.rs1!cedula_alumno & " curso el " & ModConexion.rs1!anio_cursar & " Año de Educacion Diversificada Mencion"
PRINT #Reporte, " <p><i><font size=5> Ciencias en nuestra institucion en el año escolar " & anio_esc.Text & ", mostrando una buena "
PRINT #reporte, " <p><i><font size=5> conducta durante la permanencia en la institucion."
PRINT #Reporte, " <tr>"
PRINT #Reporte, " <tr>"
PRINT #Reporte, " <tr>"
PRINT #Reporte, " <p><i><font size=5> Constancia que se expide por la parte interesada a los " & txtfecha.Day & " dias "
PRINT #Reporte, " <p><i><font size=5> del mes de " & txtfecha.Month & " del " & txtfecha.Year & "."
PRINT #Reporte, " <tr>"
PRINT #Reporte, " <tr>"
PRINT #Reporte, " <tr>"
PRINT #Reporte, " <p><i><font size=5> LIC. " & ModConexion.rs2!nombre_D & " " & ModConexion.rs2!apellido_D & " "
PRINT #Reporte, " <p><i><font size=5> DIRECTOR(a) "
PRINT #Reporte, " </center>"
ModConexion.rs1.MoveNext
DEC captura
PRINT #Reporte, " </table>"
PRINT #Reporte, " <hr>"
PRINT #Reporte, " <form>"
PRINT #Reporte, " <center>"
PRINT #Reporte, " <input type='button' value='Imprimir' OnClick='window.print()'>"
PRINT #Reporte, " <input type='button' value='Cerrar' OnClick='window.close();'>"
PRINT #Reporte, " </center>"
PRINT #Reporte, "</form>"
PRINT #Reporte, " </body>"
PRINT #Reporte, "</html>"
CLOSE #Reporte
EXEC ["firefox", "~/gambas2/liceopiotamayo/buena_conducta.html"]
END