PUBLIC FUNCTION horario()
DIM Reporte AS File
DIM Contador AS Integer = 0
DIM captura AS Integer
DIM ruta AS String
conexion.cone()
conexion.res = conexion.db.Exec("SELECT asignatura.nombre_asignatura, docente.nom, relaciones.hora_desde, relaciones.dia, relaciones.id_seccion FROM asignatura inner join relaciones on asignatura.id_asignatura = relaciones.id_asignatura inner join docente on docente.cedula = relaciones.cedula where relaciones.id_aula = '" & reportef.ComboBox1.text & "'")
conexion.res.MoveFirst
captura = conexion.res.Count
OPEN "/tmp/reportehorario.html" FOR CREATE AS #Reporte
PRINT #Reporte, "<html>"
PRINT #Reporte, " <head><title>Reporte General de aula-</title></head>"
PRINT #Reporte, " <body>"
PRINT #Reporte, " <div align='center'>"
PRINT #Reporte, " <IMG src='/home/manuel/Escritorio/SISPLANplan/barner.jpg', width = '740' height='58' align='center' border='0'>"
PRINT #Reporte, " </div>"
PRINT #Reporte, " <br>"
PRINT #Reporte, " <br>"
PRINT #Reporte, " <br>"
PRINT #Reporte, " <br>"
PRINT #Reporte, " <table align = 'center' width = '650' border = '10' cellpadding='0' cellspacing='0'>"
PRINT #Reporte, " <caption><h3><STRONG><font color='BLACK'>REPORTE GENERAL DE LOS DATOS PERSONALES DE LOS FACILITADORE</STRONG></font></h3></caption>"
PRINT #Reporte, " <tr>"
PRINT #Reporte, " <td align = 'center'bgcolor='white'><b><font color='black'>Hora</font></b></td>"
PRINT #Reporte, " <td align = 'center'bgcolor='white'><b><font color='black'>Aula</font></b></td>"
PRINT #Reporte, " <td align = 'center'bgcolor='white'><b><font color='black'>Profesor</font></b></td>"
PRINT #Reporte, " </tr>"
PRINT #Reporte, " <tr>"
WHILE Contador < captura
PRINT #Reporte, " <td align = 'center'bgcolor='silver'>" & conexion.res!hora_desde & "</td>"
PRINT #Reporte, " <td align = 'center'bgcolor='silver'>" & reportef.ComboBox1.text & "</td>"
PRINT #Reporte, " <td align = 'center'bgcolor='silver'>" & conexion.res!nom & "</td>"
PRINT #Reporte, " </tr>"
conexion.res.MoveNext
DEC captura
WEND
PRINT #Reporte, " </table>"
PRINT #Reporte, " <form>"
PRINT #Reporte, " <center>"
PRINT #Reporte, " </br>"
PRINT #Reporte, " <input type='button' value='Imprimir' OnClick='window.print()'>"
PRINT #Reporte, " </center>"
PRINT #Reporte, "</form>"
PRINT #Reporte, " </body>"
PRINT #Reporte, "</html>"
CLOSE #Reporte
EXEC ["firefox", "/tmp/reportehorario.html"]
EXEC ["wkhtmltopdf", "/tmp/repotlabel.html", "/tmp/reportehorario.pdf"]
EXEC ["evince", "/tmp/reportehorario.pdf"]
END
DIM Reporte AS File
DIM Contador AS Integer = 0
DIM captura AS Integer
DIM ruta AS String
conexion.cone()
conexion.res = conexion.db.Exec("SELECT asignatura.nombre_asignatura, docente.nom, relaciones.hora_desde, relaciones.dia, relaciones.id_seccion FROM asignatura inner join relaciones on asignatura.id_asignatura = relaciones.id_asignatura inner join docente on docente.cedula = relaciones.cedula where relaciones.id_aula = '" & reportef.ComboBox1.text & "'")
conexion.res.MoveFirst
captura = conexion.res.Count
OPEN "/tmp/reportehorario.html" FOR CREATE AS #Reporte
PRINT #Reporte, "<html>"
PRINT #Reporte, " <head><title>Reporte General de aula-</title></head>"
PRINT #Reporte, " <body>"
PRINT #Reporte, " <div align='center'>"
PRINT #Reporte, " <IMG src='/home/manuel/Escritorio/SISPLANplan/barner.jpg', width = '740' height='58' align='center' border='0'>"
PRINT #Reporte, " </div>"
PRINT #Reporte, " <br>"
PRINT #Reporte, " <br>"
PRINT #Reporte, " <br>"
PRINT #Reporte, " <br>"
PRINT #Reporte, " <table align = 'center' width = '650' border = '10' cellpadding='0' cellspacing='0'>"
PRINT #Reporte, " <caption><h3><STRONG><font color='BLACK'>REPORTE GENERAL DE LOS DATOS PERSONALES DE LOS FACILITADORE</STRONG></font></h3></caption>"
PRINT #Reporte, " <tr>"
PRINT #Reporte, " <td align = 'center'bgcolor='white'><b><font color='black'>Hora</font></b></td>"
PRINT #Reporte, " <td align = 'center'bgcolor='white'><b><font color='black'>Aula</font></b></td>"
PRINT #Reporte, " <td align = 'center'bgcolor='white'><b><font color='black'>Profesor</font></b></td>"
PRINT #Reporte, " </tr>"
PRINT #Reporte, " <tr>"
WHILE Contador < captura
PRINT #Reporte, " <td align = 'center'bgcolor='silver'>" & conexion.res!hora_desde & "</td>"
PRINT #Reporte, " <td align = 'center'bgcolor='silver'>" & reportef.ComboBox1.text & "</td>"
PRINT #Reporte, " <td align = 'center'bgcolor='silver'>" & conexion.res!nom & "</td>"
PRINT #Reporte, " </tr>"
conexion.res.MoveNext
DEC captura
WEND
PRINT #Reporte, " </table>"
PRINT #Reporte, " <form>"
PRINT #Reporte, " <center>"
PRINT #Reporte, " </br>"
PRINT #Reporte, " <input type='button' value='Imprimir' OnClick='window.print()'>"
PRINT #Reporte, " </center>"
PRINT #Reporte, "</form>"
PRINT #Reporte, " </body>"
PRINT #Reporte, "</html>"
CLOSE #Reporte
EXEC ["firefox", "/tmp/reportehorario.html"]
EXEC ["wkhtmltopdf", "/tmp/repotlabel.html", "/tmp/reportehorario.pdf"]
EXEC ["evince", "/tmp/reportehorario.pdf"]
END