HTML-report

HTML-report

Postby Marc Vanzegbroeck » Wed Feb 01, 2006 8:03 pm

Hello,

Does anybody know if there is already a class that create a HTML-file of a database. I allready found al library 'rephtml' on the PROMETHEUS-website, but there is no source file included. I want to change some things.
I was allready started to create one of myself, but I something like that allready exist it will save me some time...
I know I can save it as excel and than export it from excell to HTML, but it would be nice that the customer doesn't need an external program.

Regards,
Marc
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium

Postby DanielPuente » Fri Feb 03, 2006 1:07 am

Marc:

It's not so complicated to do it yourself, you only have to spend some time learning a few of html, then you can do something like this:

FUNCTION IMP_CAL

LOCAL hFile
Local oWnd:=WndMain(),cfile

cFile:="Calles"+".htm"

hFile:= Fcreate("Calles"+".htm")

FWrite(hFile,"<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'><!-- saved from url=(0056)http://www.scruz.gov.ar/licitacion/dpc/noticia.asp?id=38 -->")
FWrite(hFile,"<HTML xmlns:v='urn:schemas-microsoft-com:vml' xmlns:o='urn:schemas-microsoft-com:office:office' xmlns='http://www.w3.org/TR/REC-html40'><HEAD><TITLE></TITLE><META http-equiv=Content-Type content='text/html; charset=windows-1252'><META content='Microsoft FrontPage 5.0' name=GENERATOR>")
FWrite(hFile,"</HEAD><BODY><DIV align=center><CENTER><TABLE id=AutoNumber1 style='BORDER-COLLAPSE: collapse' borderColor=#111111 cellSpacing=0 cellPadding=0 width='99%' border=0 height='45'> <TBODY> <TR> <TD width='10%' height='45' rowspan='2'> <P>")
FWrite(hFile," <IMG src='logosc.bmp' border=0></P></TD> <TD width='90%' height='26'> <P align=center><font face='Comic Sans MS'>SUIS GESTION</font></P></TD></TR> <TR> <TD width='90%' height='19'> <p align='center'><SPAN style='COLOR: #003366'><FONT face='Arial Narrow'><B><FONT face=Arial size=1><SPAN style='COLOR: #003366; mso-bidi-font-size: 12.0pt'>MINISTERIO DE ASUNTOS SOCIALES</SPAN></FONT></B></FONT><FONT face='Arial Narrow' size=2><BR></FONT> <FONT face='Arial Narrow' size=1>PROVINCIA DE SANTA CRUZ</FONT></SPAN></TD></TR> <TR> <TD width='10%' height='19'> &nbsp;</TD> <TD width='90%' height='19'> <P align=center><font face='Arial' size='2' color='#003366'>")
FWrite(hFile," <a href='http://www.scruz.gov.ar'>www.scruz.gov.ar</a>&nbsp;&nbsp;&nbsp;&nbsp; </font></P></TD></TR></TBODY></TABLE></CENTER></DIV><HR>")
FWrite(hFile,"<table border='1' cellpadding='0' cellspacing='0' style='border-collapse: collapse' width='100%' id='AutoNumber2' bordercolor='#FFFFFF'>")
FWrite(hFile," <tr>")
FWrite(hFile," <td width='100%' bordercolor='#FFFFFF'>")
FWrite(hFile," <p align='center'><u><b>Listado de Calles</b></u></td>")
FWrite(hFile," </tr>")
FWrite(hFile,"</table>")

FWrite(hFile,"</BODY></HTML>")

while ! calles->(eof())
FWrite(hFile,"<div align='center'>")
FWrite(hFile,"<center>")
FWrite(hFile,"<table border='1' cellpadding='0' cellspacing='0' style='border-collapse: collapse' bordercolor='#FFFFFF' width='206' id='AutoNumber1'>")
FWrite(hFile," <tr>")
FWrite(hFile," <td width='46' align='center'> <font face='Arial' style='font-size: 11pt'>")
FWrite(hFile,CALLES->COD)
FWrite(hFile,"</td>")
FWrite(hFile," <td width='150'><font face='Arial' style='font-size: 11pt'> ")
FWrite(hFile,CALLES->DOMICILIO)
FwRITE(hFile,"</td>")
FWrite(hFile," </tr>")
FWrite(hFile,"</table>")
calles->(dbskip())
enddo

If IsWinNT()
ShellExecute( oWnd:hWnd, "open" , cFile , , , )
Else
WaitRun( "Start " + "iexplore "+wpathb+"\" +cFile, 0 )
EndIf

return .T.


Regards,
Daniel Puente
Mar del Plata, Argentina
danielpuente@speedy.com.ar
puenteda@hotmail.com
DanielPuente
 
Posts: 108
Joined: Sun Oct 09, 2005 6:12 pm
Location: Mar del Plata - Argentina

Postby Marc Vanzegbroeck » Fri Feb 03, 2006 7:56 am

Thanks Daniel,

I will try this.

Regards,
Marc
Marc Vanzegbroeck
 
Posts: 1159
Joined: Mon Oct 17, 2005 5:41 am
Location: Belgium


Return to FiveWin for CA-Clipper

Who is online

Users browsing this forum: No registered users and 9 guests