Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dbf to Html
Message
 
 
To
20/03/2007 04:51:10
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01205976
Message ID:
01205985
Views:
20
Sure. Here's an example on how to add aligment. The rest is similar
...
		FOR ix=1 to fcount()
			lcTdAttrib = []
			lcType = type(field(m.ix)) 
			IF lcType <> 'G'
				DO CASE
				CASE INLIST(lcType, "N", "I", "Y")
					lcTdAttrib = [ align="right"]
				ENDCASE
\<td<<lcTdAttrib>>><<eval(field(m.ix))>></td>
			ENDIF
		ENDFOR
...
>
>I convert dbf to html with following procedure.
>Is it possible to apply format in columns e.g.
>all numeric columns shlould appear as
>Alignment=right
>fontname=arial
>fontsize=10
>inputmask=99,99,999
>
>Please help
>
>SET SAFETY OFF
>USE ?
>
>als1=alias()
>IF !empty(als1)
>	lcHTML=alias() + '.Htm'
>	SET textmerge to (m.lcHTML) noshow
>	SET textmerge on
>\\<html>
>\<body>
>\<table border="1">
>\<tr>
>	FOR ix=1 to fcount()
>		IF type(field(m.ix)) != 'G'
>\<th><<field(m.ix)>></th>
>		ENDIF
>	ENDFOR
>\</tr>
>	SCAN
>\<tr>
>		FOR ix=1 to fcount()
>			IF type(field(m.ix)) != 'G'
>\<td><<eval(field(m.ix))>></td>
>			ENDIF
>		ENDFOR
>\</tr>
>	ENDSCAN
>\</table>
>\</body>
>\</html>
>	SET textmerge to
>	SET textmerge off
>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform