Anderson.OL Posted September 6, 2005 Author Report Share Posted September 6, 2005 citação:Anderson, enviei novamente para o endereço sac@rcasistemas.com.br Kleyton Clipper5.2E+Clipper5.3b+Blink7+FW2.0d cleitonbala@bol.com.br id=quote>id=quote>Kleyton, a sua classe parece aceitar o que eu quero, sendo que está dando um erro de Array Access, veja abaixo: Error BASE/1068 Argument error: array access Args: [ 1] = A { ... } Array [ 2] = U ... Called from TDOSPRN:END(624) Abraços Nesse mundo nada se cria, tudo se compila<< //--Clipper 5.3b / FiveWin 2.6 / Blinker 7.0 --// //-- _Dom Quixote_ RO Iris Server / Agility Kina / 7*/3* Quote Link to comment Share on other sites More sharing options...
elitenet Posted September 7, 2005 Report Share Posted September 7, 2005 Anderson Mande para meu e-mail a classe tdosprn e a descrição do erro que vejo o que pode estar acontecendo. Na minha classe ja aconteceu uma coisa parecida e fiz algumas alteracoes na mesma e parou o problema. Marcelo Gomes elitenet@terra.com.br FW 2.3C/CLIPPER 5.2E/BLINKER 7.0 Quote Link to comment Share on other sites More sharing options...
vagner Posted September 7, 2005 Report Share Posted September 7, 2005 Olá Anderson.Ol O Problema é q vc precisa ressetar a impressão senão a TDosPrn vai estourar, não têm jeito, se vc inicializar a impressora isso para de ocorrer, estou postando um código que eu uso. Eu formato a impressora para trabalhar como se cada etiqueta fosse uma página, repare no CHR(27)+.... /****************************************************************************/ /* Emissao de Etiquetas */ /* Programador - Vagner Wirts */ /* Programa - Fat3_030.Prg */ /****************************************************************************/ // #Include "FiveWin.Ch" /*---------*/ Proc Fat3_030() Local lOk1,lOk2 Close Data lOk2 := Abre(cArqu_Cobra+".Dbf\Duplicat",{cArqu_Cobra+".Cdx\Dupl_Dup",cArqu_Cobra+".Cdx\Dupl_Fil",cArqu_Cobra+".Cdx\Dupl_Nom",cArqu_Cobra+".Cdx\Dupl_Bco"},"Duplicat") lOk1 := .F. Do Whil .T. Use \Tr1Wells\Arquivos\Arqu_Ger.dbf\Clientes New Share Alias Clientes Set Inde To \Tr1Wells\Arquivos\Arqu_Ger.cdx\Clientes If Used() lOk1 := .T. Exit Endif Enddo If !lOk1.or.!lOk2 Close Data Retu("") Endif oFatIni := nFatIni := 0 oFatFin := nFatFin := 0 Define Font oFont Name "Ms Sans Serif" Size 6 ,7 Define Dialog oFat3030 From 53,53 To 120,334 Pixel Title "Emissão de Etiquetas" Font oFont @ 000,001 To 018,140 Of oFat3030 Pixel Label "Faturas" @ 008,003 Say "Inicial" Pixel Size 026,08 @ 008,020 Get oFatIni Var nFatIni Pict "999999" Pixel Size 022,07 Font oFont Valid(FatInic()) @ 008,100 Say "Final" Pixel Size 026,08 @ 008,116 Get oFatFin Var nFatFin Pict "999999" Pixel Size 022,07 Font oFont @ 020,002 Dbutton oBut1 Prompt "&Confirma" Name "OpcaoSim" Of oFat3030 GLIP POS 7 Size 40,14 Action(ImpEti()) ToolTip "Confirma os Dados" @ 020,100 Dbutton oBut4 Prompt "&Sair" Name "OpcaoSai" Of oFat3030 GLIP POS 7 Size 40,14 Action(oFat3030:End()) ToolTip "Sai da Listagem" Activate Dialog oFat3030 Center Close Data Retu("") /*---- Funcao para pegar a Primeira Duplicata -----*/ Static Func FatInic() If Empty(nFatIni) oFat3030:End() Retu(.T.) Endif Sele Duplicat Seek StrZero(nFatIni,6) If !Found() MsgAlert("Fatura Inicial Não Encontrada.","Atenção !!") Retu(.F.) Endif Retu(.T.) /*--------- Funcao para Imprimir Faturas --------*/ Static Func ImpEti() If !Isprinter() MsgAlert("A Impressora Não Está Respondedo."+CRLF+"Verifique Se Está Ligada.","Atenção !!") Retu("") Endif cFatF := StrZero(nFatFin,6) Sele Duplicat Seek StrZero(nFatIni,6) nLin := 1 oPrin := TDosPrn():New() Do Whil .T. lSn := SimNao("Teste de Alinhamento ?","Atenção !!") If !lSn ; Exit ; Endif oPrin:StartPage() @ 0000,00 PSay Chr(27)+"@"+Chr(27)+"C"+Chr(10)+Chr(18) nLin := 1 @ nLin,00 PSay "A/C" @ nLin,43 PSay "A/C" // @ nLin,87 PSay "A/C" nLin ++ @ nLin,00 PSay Repl("X",40) // Contato @ nLin,43 PSay Repl("X",37) // @ nLin,87 PSay Repl("X",40) nLin ++ @ nLin,00 PSay Repl("X",40) // Nome @ nLin,43 PSay Repl("X",37) // @ nLin,87 PSay Repl("X",40) nLin ++ @ nLin,00 PSay Repl("X",40) // Endereco @ nLin,43 PSay Repl("X",37) // @ nLin,87 PSay Repl("X",40) nLin ++ @ nLin,00 PSay Repl("X",20) // Bairro @ nLin,43 PSay Repl("X",20) // @ nLin,87 PSay Repl("X",20) nLin ++ @ nLin,00 PSay Repl("X",25)+"/XX" // Cidade/Estado @ nLin,43 PSay Repl("X",25)+"/XX" // @ nLin,87 PSay Repl("X",25)+"/XX" nLin ++ @ nLin,00 PSay "CEP : 99999-999" // Cep @ nLin,43 PSay "CEP : 99999-999" // @ nLin,87 PSay "CEP : 99999-999" nLin += 2 @ nLin,00 PSay Chr(27)+"@" oPrin:EndPage() Enddo Do Whil !Eof() *---- Verifica se Refaturamento ou Nao ----* If lProgNormal == ReFatu Skip Loop Endif If Situac .or. Left(Observ,6) == "CANCEL" .or. Empty(ValDup) Skip Loop Endif If Duplic > cFatF Go Bott Skip Loop Endif nCon := 1 // aCli := {{" "," "," "," "," "," "," "," "},{" "," "," "," "," "," "," "," "},{" "," "," "," "," "," "," "," "}} aCli := {{" "," "," "," "," "," "," "," "},{" "," "," "," "," "," "," "," "}} Do Whil !Eof() .and. nCon < 3 *---- Verifica se Refaturamento ou Nao ----* If lProgNormal == ReFatu Skip Loop Endif If Left(Observ,6) == "CANCEL" .or. Empty(ValDup) Skip Loop Endif If Duplic > cFatF nCon := 8 Go Bott Skip Loop Endif cCgc := CgcCpf Sele Clientes Seek cCgc cNom := Nome__ cEnd := EndCob cBai := BaiCob cCid := CidCob cEst := EstCob cCep := CEPCob If Atenca aCli[nCon][7] := "A/C" aCli[nCon] := Contat Endif aCli[nCon][1] := Left(cNom,37) aCli[nCon][2] := Left(cEnd,37) aCli[nCon][3] := Left(cBai,37) aCli[nCon][4] := cCid aCli[nCon][5] := cEst aCli[nCon][6] := cCep nCon ++ Sele Duplicat Skip Enddo oPrin:StartPage() @ 0000,00 PSay Chr(27)+"@"+Chr(27)+"C"+Chr(10)+Chr(18) nLin := 1 @ nLin,00 PSay aCli[1][7] // A/C @ nLin,43 PSay aCli[2][7] // @ nLin,87 PSay aCli[3][7] nLin ++ @ nLin,00 PSay aCli[1] // Contato @ nLin,43 PSay aCli[2] // @ nLin,87 PSay aCli[3] nLin ++ @ nLin,00 PSay aCli[1][1] // Nome @ nLin,43 PSay aCli[2][1] // @ nLin,87 PSay aCli[3][1] nLin ++ @ nLin,00 PSay aCli[1][2] // Endereco @ nLin,43 PSay aCli[2][2] // @ nLin,87 PSay aCli[3][2] nLin ++ @ nLin,00 PSay aCli[1][3] // Bairro @ nLin,43 PSay aCli[2][3] // @ nLin,87 PSay aCli[3][3] nLin ++ @ nLin,00 PSay aCli[1][4]+"/"+aCli[1][5] // Cidade/Estado @ nLin,43 PSay aCli[2][4]+"/"+aCli[2][5] // @ nLin,87 PSay aCli[3][4]+"/"+aCli[3][5] nLin ++ @ nLin,00 PSay "CEP : "+aCli[1][6] // Cep @ nLin,43 PSay "CEP : "+aCli[2][6] // @ nLin,87 PSay "CEP : "+aCli[3][6] nLin += 2 @ nLin,00 PSay Chr(27)+"@" oPrin:EndPage() Enddo Retu("") Vagner Wirts Clipper 5.2 Lib 5.3 - Blinker 5.0 FW 2.0, Harbour 43.0 (Flex), xHarbour 99.1 99.2 99.3 (Simplex) FW 2.5 Quote Link to comment Share on other sites More sharing options...
Kleyton Posted September 7, 2005 Report Share Posted September 7, 2005 Anderson, deve ser algum parâmetro que sua classe está utilizando e a minha não. Se quiser mandar parte da rotina que está utilizando para eu testar aqui? Kleyton Clipper5.2E+Clipper5.3b+Blink7+FW2.0d cleitonbala@bol.com.br Quote Link to comment Share on other sites More sharing options...
Anderson.OL Posted September 8, 2005 Author Report Share Posted September 8, 2005 Pessoal, vlw pela força, decidi ficar com a classe TDosPrn do Kleiton. Qto ao erro ao executar o metodo End(), desabilitei a opcao de executar um comando dai ficou tudo certo... Obrigado e abraço a todos. Nesse mundo nada se cria, tudo se compila<< //--Clipper 5.3b / FiveWin 2.6 / Blinker 7.0 --// //-- _Dom Quixote_ RO Iris Server / Agility Kina / 7*/4* Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.