Imprimir estructura de bases DBF
Despues de unos dias de brega y algo de ayuda, conseguí lo que pretendía. Adjunto el código fuente por si a alguien pudiera serle de utilidad.
Saludos y gracias
//--------------------------------------------------------------------------------------------/
#include "FiveWin.ch"
#include "Ide.ch"
//----------------------------------------------------------------------------//
Function Main()
SET RESOURCES TO "ImprBase.dll"
SET _3DLOOK ON
ImpEstr("Cuenta.dbf")
Return nil
//-----------------------------------------------------------------------------//
Static Func ImpEstr(cBase)
Local oPrn,oFont
Local nLin, npag, nLinMax, nItens, nCamp
Local aEstruct := {}
If cBase = Nil
Return
End
Use (cBase)
aEstruct:=DBStruct()
Use
PRINT oPrn NAME "Estructura" PREVIEW
If Empty( oPrn:hDC )
Return(Nil)
EndIf
nLin := 6
nPag := 0
nLinMax := 27
nItens := 0
nCamp := 1
PAGE
oPrn:CmSay( (nLin - 2.5), 1.5, "ESTRUCTURA DE LA BASE DE DATOS, " + Upper((cBase)) )
oPrn:CmSay( (nLin - .5), 1.5, Replicate("=", 32) )
oPrn:CmSay( (nLin - 1), 1.5, "Nº Campo Tipo Long. Dec. " )
FOR i=1 to LEN(aEstruct)
oPrn:CmSay(nLin,1, Str(nCamp) + " " + aEstruct[i,1] )
oPrn:CmSay(nLin,4.4, aEstruct[i,2] )
oPrn:CmSay(nLin,5, STR(aEstruct[i,3],5,0) + " " + STR(aEstruct[i,4],1,0) )
nLin += 0.7
nCamp ++
NEXT i
oPrn:CmSay( (nLin - .2), 1.5, Replicate("=", 32) )
ENDPAGE
ENDPRINT
Return
//------------------------------------------------------------------------//