https://foro.gambas-es.org/viewtopic.php?f=1&t=1501&p=8689#p8689 ----------------------------------- SOURBOY Viernes, 18 Marzo 2011, 00:28 DE NUEVO CON LOS..REPORTE HTML Y PDF... ----------------------------------- [code linenumbers=false syntax=gambas]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, "" PRINT #Reporte, " Reporte General de aula-" PRINT #Reporte, " " PRINT #Reporte, "
" PRINT #Reporte, " " PRINT #Reporte, "
" PRINT #Reporte, "
" PRINT #Reporte, "
" PRINT #Reporte, "
" PRINT #Reporte, "
" PRINT #Reporte, " " PRINT #Reporte, " " PRINT #Reporte, " " PRINT #Reporte, " " PRINT #Reporte, " " PRINT #Reporte, " " PRINT #Reporte, " " PRINT #Reporte, " " WHILE Contador < captura PRINT #Reporte, " " PRINT #Reporte, " " PRINT #Reporte, " " PRINT #Reporte, " " conexion.res.MoveNext DEC captura WEND PRINT #Reporte, "

REPORTE GENERAL DE LOS DATOS PERSONALES DE LOS FACILITADORE

HoraAulaProfesor
" & conexion.res!hora_desde & "" & reportef.ComboBox1.text & "" & conexion.res!nom & "
" PRINT #Reporte, "
" PRINT #Reporte, "
" PRINT #Reporte, "
" PRINT #Reporte, " " PRINT #Reporte, "
" PRINT #Reporte, "
" PRINT #Reporte, " " PRINT #Reporte, "" CLOSE #Reporte EXEC ["firefox", "/tmp/reportehorario.html"] EXEC ["wkhtmltopdf", "/tmp/repotlabel.html", "/tmp/reportehorario.pdf"] EXEC ["evince", "/tmp/reportehorario.pdf"] END[/code]