Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Visualizacao de retorios no formato txt
Message
De
27/02/2003 15:52:30
 
 
À
26/02/2003 09:58:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00758072
Message ID:
00759044
Vues:
17
Uma forma simples e rápida:

peque seu txt e coloque os seguintes comandos html nele:
* antes do texto
HTML
HEAD
TITLE --Escreva o Título do relatório-- /TITLE
/HEAD
BODY
PRE

*** AQUI ENTRA O TEXTO DO SEU ARQUIVO

* no final do texto:
/PRE
/BODY
/HTML

* Observe o seguinte: os comandos html devem estar em TAGS "<" e ">"
* não as coloquei aqui para não dar confusão na thread.
Pronto salve seu arquivo TXT com extensão HTML e vc pode abri-lo no explorer ou netscape ...

sds


>Tenhos alguns relatorio baseados em @ say, são elatorio gerencias que normalmente fica muito dificil faze-lo no report do fox, neste caso gero um arquivo .TXT e visualizo como controle EDITBOX, como segue o exemplo abaixo, mas estou precisando de uma visualizador mais profissional, pode ser .prg, dll, utilitario externo, qualquer coisa melhor que a minha solucao.
>
>Marcelo.
>
>
>**************************************************
>*-- Form: view_txt (h:\hsj_sql\forms\view_txt.scx)
>*-- ParentClass: form
>*-- BaseClass: form
>*-- Time Stamp: 07/07/02 03:01:09 PM
>*
>PARAMETERS lcFilename,ctam
>
>form_view =CREATEOBJECT("view_txt")
>CREATE CURSOR textfile (filename c(60),mem m)
>APPEND BLANK
>
>IF EMPTY(lcFileName)
> Wait WINDOW "FAVOR INFORMAR UM ARQUIVO"
> return
>ENDIF
>IF !file(lcFileName)
> Wait WINDOW "Não há registro a imprimir"
> return
>ENDIF
>
>REPLACE textfile.FileName WITH lcFileName
>SELECT textfile
>APPEND MEMO mem FROM (lcFileName) OVERWRITE
>form_view.edtText.ControlSource = "textfile.mem"
>form_view.edtText.enabled = .t.
>form_view.edtText.readonly = .t.
>If ctam = "132"
> form_view.edtText.FontSize = 7
>else
> form_view.edtText.FontSize = 9
>EndIf
>form_view.caption=[Visualizando arquivo: ]+lcFilename
>form_view.Refresh
>form_view.show()
>Select textfile
>Use
>Erase (lcFileName)
>Return
>
>DEFINE CLASS view_txt AS form
>
> WindowType=1 && modal
> Top = 0
> Left = 0
> Height = 540
> Width = 751
> DoCreate = .T.
> BorderStyle = 0
> FontBold = .F.
> FontCondense = .F.
> FillStyle = 0
> WindowState = 0
> Name = "view_txt"
>
>
> ADD OBJECT edttext AS editbox WITH ;
> FontName = "Courier New", ;
> FontCondense = .F., ;
> AddLineFeeds = .F., ;
> Height = 541, ;
> Left = 0, ;
> ReadOnly = .T., ;
> ScrollBars = 2, ;
> Top = -1, ;
> Width = 750, ;
> ForeColor = RGB(0,0,160), ;
> DisabledBackColor = RGB(255,255,255), ;
> IntegralHeight = .F., ;
> Name = "edtText"
>
> PROCEDURE edttext.KeyPress
> LPARAMETERS nKeyCode, nShiftAltCtrl
> IF nKeyCode=27
> thisform.release
> ENDIF
>
>ENDDEFINE
>*
>*-- EndDefine: view_txt
>**************************************************
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform