Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to do this...
Message
 
To
04/09/2002 10:32:24
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00696451
Message ID:
00696775
Views:
28
>
>OK, so how do I create an HTML report so I can FTP it?
>
>Sandi
Sandi,

Here's some quick and dirty code you can expand on;
create cursor mycursor (cfield1 c(10), nfield2 n(10))

FOR i = 1 TO 10
	m.cfield1 = TRANSFORM((RAND(i+10)*100)-i)
	m.nfield2 = RAND(i+10)*100
	INSERT INTO mycursor FROM memvar
NEXT i

lchtml = '<html><body><table border=1>'
select mycursor 
go top
scan
  lchtml = lchtml + '<tr>'
    lchtml = lchtml + '<td><font face=arial><b>' + allt(mycursor.cfield1) + '</b></font></td>'
    lchtml = lchtml + '<td><font face=courier>' + trans(mycursor.nfield2) + '</font></td>'
  lchtml = lchtml + '</tr>'
endscan
lchtml = lchtml + '</table></body></html>'

STRTOFILE(lchtml,'c:\testhtm.htm')
Wayne Myers, MCSD
Senior Consultant
Forte' Incorporated
"The only things you can take to heaven are those which you give away" Author Unknown
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform