Jump to content

dev botao

  • Este tópico foi criado há 2101 dias atrás.
  • Talvez seja melhor você criar um NOVO TÓPICO do que postar uma resposta aqui.

Recommended Posts

Posted

Problema é o seguinte. Ao escolher a impressora funciona, mas ao escolher a segunda impressora ou voltar para a padrão, fica na 1 escolhida. Vou colocar o código fonte.

    if (pos('<mod>65</mod>', linha) > 0) then begin
      ACBrNFeDANFeRL1.TipoDANFE:=tiNFCe;
      ACBrNFe1.DANFE:=ACBrNFeDANFCeFortes1;
      ACBrNFeDANFCeFortes1.Impressora:=Trim(qry_empresa.FieldByName('impressora_nfce').AsString);  // primeira escolha
      ACBrNFe1.NotasFiscais.Items[0].NFe.Ide.tpImp  := tiNFCe;
    end
    else begin
      ACBrNFe1.DANFE:=ACBrNFeDANFeRL1;
      //ACBrNFeDANFCeFortes1.Impressora:=Printer.Printers[Printer.PrinterIndex];   //depois não volta mais
      if rgTipoDanfe.ItemIndex = 0 then begin
        ACBrNFe1.NotasFiscais.Items[0].NFe.Ide.tpImp := tiRetrato;
        ACBrNFe1.DANFE.TipoDANFE := tiRetrato;
      end
      else begin
        ACBrNFe1.NotasFiscais.Items[0].NFe.Ide.tpImp := tiPaisagem;
        ACBrNFe1.DANFE.TipoDANFE := tiPaisagem;
      end;
    end;

Alguem ja passou por isso ?

  • Este tópico foi criado há 2101 dias atrás.
  • Talvez seja melhor você criar um NOVO TÓPICO do que postar uma resposta aqui.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.