General information
Title:
Visualizacao de retorios no formato txt
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
**************************************************
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only