marcioe Posted June 29, 2015 Report Share Posted June 29, 2015 Amigos. Preciso emitir Um cte com varias chaves de Notas Fiscais, Então estava pensando em fazer via array com Fast Report, porem não tenho ideia de como fazer isso. Caso algum amigo tenha a emissao de Itens da Nota Fiscal com Array, já serve para tirar ideias. Não posso criar queria cirar Arquivo Temporário (DBF), Até Porque usamos em algumas estaçoes Linux e em outras Windows neste sistema. O ideal Seria o Array mesmo. Vajam a Chaves no XML de onde preciso Extrair DESDE JÁ AGRADEÇO AOS AMIGOS Ronaldbuch 1 Quote Link to comment Share on other sites More sharing options...
kapiaba Posted June 29, 2015 Report Share Posted June 29, 2015 Olá, você tem estas CHAVES, apenas no .XML, ou tem também em um diretório? Quote Link to comment Share on other sites More sharing options...
Theotokos Posted June 29, 2015 Report Share Posted June 29, 2015 Bom Dia! o Teu problema é pegar os dados no XML ou enviar para o FastReport com array? Quote Link to comment Share on other sites More sharing options...
kapiaba Posted June 29, 2015 Report Share Posted June 29, 2015 Se você tem somente no .XML, pode "capturar" a chave desta mandeira: nChave := HB_ATokens( TempTextDT, '<chave>' ) Quote Link to comment Share on other sites More sharing options...
marcioe Posted June 29, 2015 Author Report Share Posted June 29, 2015 eu tenho o XML, em um diretorio. Pode ser de um diretorio, o que nao sei é fazer imprimir o array no fast. esse que é a questão Ler ele eu sei, jogar as chaves no array eu sei fazer, agora fazer o fast entender esse array que nao sei Quote Link to comment Share on other sites More sharing options...
kapiaba Posted June 29, 2015 Report Share Posted June 29, 2015 Uma idéia: Quote Link to comment Share on other sites More sharing options...
marcioe Posted June 29, 2015 Author Report Share Posted June 29, 2015 Caros amigos O que quero fazer pe a impressao das chaves de um XML. Para ilustrar, imagina imprimir os itens da uma nota fiscal., ou seja tem o código, nome, etc.... Serie isso que carregar o array e no fast imprimir os dados deste array. No fast que nao sei como jogar isso lá, Quais Tags quais comandos, etc... Quote Link to comment Share on other sites More sharing options...
Theotokos Posted June 29, 2015 Report Share Posted June 29, 2015 Vê se te ajuda: Procedure PrtRecibo() * Private a1 := 1, a2 := 1 Private aCabecalho := Array(1,13) Private aPagamento := { } Private aExtrato := { } Private aGrafico := { } * aCabeca := {"Cliente","Endereco","Bairro","Cidade","Telefone","Celular","Documento",+; "Total Quitado","Total Debito","Dinheiro","Cheque","Cartao","DtPagamento"} * cCabecalho := "Cliente;Endereco;Bairro;Cidade;Telefone;Celular;Documento;"+; "Total Quitado;Total Debito;Dinheiro;Cheque;Cartao;DtPagamento" * aCabecalho[1,01] := cNomeCliente aCabecalho[1,02] := cEndereco aCabecalho[1,03] := cBairro aCabecalho[1,04] := cCidade aCabecalho[1,05] := cTelefone aCabecalho[1,06] := "" aCabecalho[1,07] := cDocumento aCabecalho[1,08] := nTotalPg aCabecalho[1,09] := nSaldo aCabecalho[1,10] := nTotalPg // DINEHIRO = Mudar depois para a variavel de dinheiro aCabecalho[1,11] := 0.00 // Cheque aCabecalho[1,12] := 0.00 // Cartao aCabecalho[1,13] := Date() * * Dados das Prestações Pagas * aPaga := {"Nota Promissoria","Prestação","Vencimento","Valor Pago"} cPagamento := "Nota Promissoria;Prestação;Vencimento;Valor Pago" * For n1 := 1 To Len(aDados) cNp := aDados[n1,1] cPr := aDados[n1,2] cVe := aDados[n1,4] cVr := aDados[n1,6] * AADD( aPagamento, { cNp, cPr, cVe, cVr } ) * Next n1 * * PRESTAÇÕES QUE FALTAM PARA PAGAR - Extrato * aConta := {"Nota Promissoria","Prestação","Vencimento","Valor"} cExtrato := "Nota Promissoria;Prestação;Vencimento;Valor" * For n1 := 1 To Len(aPrestacao) cNr := aPrestacao[n1,1] cPr := aPrestacao[n1,2] cVe := aPrestacao[n1,3] cPa := aPrestacao[n1,4] * AADD( aExtrato, {cNR, cPr, cVe, cPa} ) * Next n1 * nCopia := 1 * cDirFr := CurDrive() +":\"+ CurDir() + '\Formulario\' //Variável para Localizar o Arquivo * FrPrn := frReportManager():New() //Abertura do FastReports FrPrn:SetIcon(1) //Escolha do Ícone FrPrn:SetTitle("Recibo") //Titulo da Dialog no FastReports ******************************************************************* FrPrn:LoadLangRes( cDirFr+"BRAZIL.XML") ******************************************************************* //--> Cabeçalho do Recibo FrPrn:SetUserDataSet("aCabecalho",cCabecalho, ; {||a1 := 1}, ; //--> bGoTop {||a1 := a1 + 1}, ; //--> bSkipPlus {||a1 := a1 - 1}, ; //--> bSkipMinus {||a1 > Len(aCabecalho)}, ; //--> bCheckEOF {|aField1| cPesq1 := aField1, nCol := ASCAN(aCabeca,{|p1| p1 = cPesq1}),; aCabecalho[a1, nCol] } ) * //--> Pagamento FrPrn:SetUserDataSet("aPagamento",cPagamento, ; {||a1 := 1}, ; //--> bGoTop {||a1 := a1 + 1}, ; //--> bSkipPlus {||a1 := a1 - 1}, ; //--> bSkipMinus {||a1 > Len(aPagamento)}, ; //--> bCheckEOF {|aField2| cPesq2 := aField2, nCol := ASCAN(aPaga,{|p2| p2 = cPesq2}),; aPagamento[a1, nCol] } ) * //--> Extrato FrPrn:SetUserDataSet("aExtrato",cExtrato, ; {||a1 := 1}, ; //--> bGoTop {||a1 := a1 + 1}, ; //--> bSkipPlus {||a1 := a1 - 1}, ; //--> bSkipMinus {||a1 > Len(aExtrato)}, ; //--> bCheckEOF {|aField3| cPesq3 := aField3, nCol := ASCAN(aConta,{|p3| p3 = cPesq3}),; aExtrato[a1, nCol] } ) * FrPrn:PreviewOptions:SetAllowEdit( .F. ) FrPrn:PreviewOptions:SetZoomMode(1) FrPrn:PreviewOptions:SetOutlineExpand(.f.) * *FrPrn:PreviewOptions:SetMaximized(.f.) * DoFrAction("Recibo.fr3",.f.,.t.,.f.,.t.,"OS\R_"+DtoS(Date())+"_"+StrZero(cNumeroCliente,8)) * FrPrn:ClearDataSets() //Inutiliza Todas as Informações de DataBase no FastReports * FrPrn:DestroyFR() //Fecha (ou 'Destroi') o Objeto do FastReports * Return Quote Link to comment Share on other sites More sharing options...
marcioe Posted June 29, 2015 Author Report Share Posted June 29, 2015 Eu queria ver que ' band ' vc usou no fast para jogar o 'aPagamento', posta a imagem se puder Quote Link to comment Share on other sites More sharing options...
Theotokos Posted June 29, 2015 Report Share Posted June 29, 2015 é uma masterdata Quote Link to comment Share on other sites More sharing options...
marcioe Posted June 29, 2015 Author Report Share Posted June 29, 2015 Há ta simples ... Caraça nem tinha imaginadi Theotokos 1 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.