Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dbf to Html
Message
 
 
À
20/03/2007 04:51:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01205976
Message ID:
01205985
Vues:
19
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--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform