Problema Al Intentar Imprimir Un Tableview En Formato Html


Subject: Problema Al Intentar Imprimir Un Tableview En Formato Html
Hola mister mi problema es el siguiente quiero imprimir unos registros de un tableview en formato html pero me dice error en null key.
una pequeña parte del código...

FOR i = 0 TO (tabla.Count - 1)
PRINT #formulario, "<tr>"
FOR h = 0 TO (tabla.Columns.Count - 1)
PRINT #formulario, "<td>" & tabla[i][h] & "</td>" 'aqui me da el error NULL KEY...
NEXT
PRINT #formulario, "</tr>"
NEXT

Profile PM  
Subject: Re: Problema Al Intentar Imprimir Un Tableview En Formato Html
Prueba con

PRINT #formulario, "<td>" & tabla[i,h].Text & "</td>"

Suerte.

Profile PM  
Subject: Re: Problema Al Intentar Imprimir Un Tableview En Formato Html
hermano disculpa, el objeto es un columview, lo hice de la forma que me dijisteis PRINT #formulario, "<td>" & tabla[i,h].Text & "</td>" y nada, da error too many arguments, es algo que tiene que ver con el key
La información que está en la tabla está organizada por un order by y la quiero impresa en html, allí creo es que pierde el orden de los apuntadores o algo así.
el código par imprimir...

PUBLIC SUB btreporte_Click()
DIM formulario AS File
DIM nominforme AS String
DIM ho AS Result
DIM i, h AS Integer
IF (tabla.Count > 0 AND tabla.Columns.Count > 0) THEN
OPEN Application.Path & "/informes/reporte1.html" FOR WRITE CREATE AS #formulario
IF (TextBox1.Length > 0) THEN
nominforme = TextBox1.Text
ELSE
nominforme = InputBox("Nombre del Encabezado del Informe")
ENDIF
PRINT #formulario, "<html><head><title>" & nominforme & "</title>"
PRINT #formulario, "<meta content='text/html;' http-equiv='content-type' charset='utf-8'></head>"
PRINT #formulario, "<body>"
PRINT #formulario, "<script type='text/javascript'>"
PRINT #formulario, "var i=1;"
PRINT #formulario, "var titulooriginal = document.title;"
PRINT #formulario, "function cambiarTitulo()"
PRINT #formulario, "{"
PRINT #formulario, "document.title = titulooriginal.substring(0,i);"
PRINT #formulario, "i++;"
PRINT #formulario, "if (i>titulooriginal.length) i=0;"
PRINT #formulario, "setTimeout('cambiarTitulo()',250);"
PRINT #formulario, "}"
PRINT #formulario, "cambiarTitulo();"
PRINT #formulario, "</script>"
PRINT #formulario, "<table><tr><td><img src=Gambas_Logo.png></td><td><h1>" & nominforme & "</h1></td></tr></table>"
PRINT #formulario, "<table border='1'><tr>"
FOR i = 0 TO (tabla.Columns.Count - 1)
PRINT #formulario, "<td align='center' WIDTH=200>" & tabla.Columns[i].Text & "</td>"
NEXT
PRINT #formulario, "</tr>"
FOR i = 0 TO (tabla.Count - 1)
PRINT #formulario, "<tr>"
FOR h = 0 TO (tabla.Columns.Count - 1)
PRINT #formulario, "<td>" & tabla[i][h] & "</td>" 'aqui es que da el error de null key...
'PRINT #formulario, "<td>" & tabla[i, h].Text & "</td>"
NEXT
PRINT #formulario, "</tr>"
NEXT
PRINT #formulario, "</table><BR><BR>"

PRINT #formulario, "<p> Reporte Impreso el Dia: " & Format(Date, "dd/mm/yyyy") & "</p>"
PRINT #formulario, "<input type='button' name='Imprimir Informe' value='Imprimir' onclick='window.print();'>"
PRINT #formulario, "</body></html>"
CLOSE #formulario
SHELL ("firefox " & Application.Path & "/informes/reporte1.html")
ENDIF
END

Profile PM  

Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Design by DiDiDaDo

Generation Time: 0.1165s (PHP: -39% SQL: 139%)
SQL queries: 22 - Debug Off - GZIP Enabled