Problema Al Intentar Imprimir Un Columview En Formato Html


Subject: Problema Al Intentar Imprimir Un Columview En Formato Html
El objeto es un columview, , es algo que tiene que ver con el key porqye dice null 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 para 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  
Subject: Re: Problema Al Intentar Imprimir Un Columview En Formato Html
PRINT #formulario, "<td>" & tabla[i][h] & "</td>" 'aqui es que da el error de null key...


Hay un error en tabla[i][h], es tabla[i,h]


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.1472s (PHP: -45% SQL: 145%)
SQL queries: 23 - Debug Off - GZIP Enabled