USUÁRIO:      SENHA:        SALVAR LOGIN ?    Adicione o VBWEB na sua lista de favoritos   Fale conosco 

 

  Fórum

  Visual Basic
Voltar
Autor Assunto:  Objeto Printer
Knight
GOIÂNIA
GO - BRASIL
Postada em 06/07/2004 21:39 hs         
Escrevi um código com o objeto printer. Alinhando ele aos campos de uma nota fiscal. Tava saindo tudo certo, dentro dos seus respectivos campos, ate q coloquei um for com 10 repetiçoões na linha de unidade, quantidade e preço total.
Depois disso ele começou a jogar as linhas abaixo do for 10 linha para baixo.
Pq isso ocorre??
Como faço para evitar
 
Coloquei o codigo abaixo para v se facilita para vcs
 
Agradeço desde já
 
 
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print Tab(15); "Joaquim Pires de Almeida Junior"; Tab(140); "23/02/1975"
Printer.Print Tab(15); "Rua 25B Nº36"; Tab(110); "Setor Oeste"
Printer.Print
Printer.Print Tab(15); "Goiânia"; Tab(75); "Go"; Tab(110); "74.120-160"; Tab(145); "TESTE"
Printer.Print Tab(15); "12.123.456/00001-88"; Tab(75); "Isento"
Printer.Print Tab(15); "Insc Municipal -- Isento"
Printer.Print Tab(15); "A vista"; Tab(145); "00001"
Printer.Print
Printer.Print
Printer.Print
Printer.Print
For i = 1 To 10
Printer.Print Tab(2); "Qtde"; Tab(10); "UND"; Tab(20); "DESCRICAO"; Tab(128); "PERCO"; Tab(145); "PRECO TOTAL"
Next i
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print Tab(2); "23/02/1975"; Tab(45); "1234567890"; Tab(85); "0000000000001"; Tab(130); "hoje/00/0000"
Printer.Print
Printer.Print
Printer.Print
Printer.Print Tab(15); "5%++"; Tab(60); "100-5%=5,00++"; Tab(145); "TOTAL VALOR"
Printer.Print
Printer.Print
Printer.Print
Printer.Print
Printer.Print Tab(145); "0001++"
Printer.EndDoc
 
End Sub
 

Emoções Knight Emoções

http://host.csti.eti.br

CSTI WebHosting
Hospedando Idéias Emoções

     
|-tom-|
Pontos: 2843
CATANDUVA
SP - BRASIL
Postada em 07/07/2004 08:37 hs            
meu caro amigo eu creio q vc deve fazer uma verificação antes de continuar o for durante 10 vezes , tipo assim :
 
For i = 1 To 10
       if Qtde <>
         Printer.Print Tab(2); "Qtde"; Tab(10); "UND"; Tab(20); "DESCRICAO";
         Tab(128); "PERCO"; Tab(145); "PRECO TOTAL"
      else
         Exit For
      endif
Next i
Se deve ta imprimindo linha em branco por isso deve ta acontecendo isso , verifica ai depois vc me retorna.
 
Ok
     
Knight
GOIÂNIA
GO - BRASIL
Postada em 07/07/2004 14:33 hs         
Cara, Obrigado por responder
 
Não esta imprimindo linha em branco não.
Ele esta imprimindo QTDE,UND,DESCRICAO,PRECO,PRECO TOTAL 10 vezes
 
A linha onde escreve 23/02/1975 ta saindo 10 linhas abaixo de onde era para sair, assim como as linhas abaixo dessa
 
 

Emoções Knight Emoções

http://host.csti.eti.br

CSTI WebHosting
Hospedando Idéias Emoções

     
|-tom-|
Pontos: 2843
CATANDUVA
SP - BRASIL
Postada em 07/07/2004 14:55 hs            
Qtde , Unid. , Descricao  seria os itens da nota, mais qtas linhas sao utilizadas para isso são 10, se são 10 entao vc deve apagar 10 Printer após os itens, pq vc inseriu o codigo for pra imprimir 10 vezes só q os printer abaixo dele tb imprimem e com isso inseri linhas abaixo .
 
Ok 

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 tom -Catanduva/SP

Analista Sistemas - Visual Basic 6 - VB.NET

"Confiai perpetuamente no Senhor, porque o Senhor Deus é uma Rocha Eterna"

                                                                                              Isaías 26:4  Emoções 

 

     
Knight
não registrado
Postada em 07/07/2004 15:50 hs   
Ok
 
Obrigado
     
Página(s): 1/1    


Seu Nome:

Seu eMail:

ALTERAR PARA MODO HTML
Mensagem:

[:)] = 
[:P] = 
[:(] = 
[;)] = 

HTML DESLIGADO

     
 VOLTAR

  



CyberWEB Network Ltda.    © Copyright 2000-2025   -   Todos os direitos reservados.
Powered by HostingZone - A melhor hospedagem para seu site
Topo da página