rubensma Posted April 4, 2016 Report Share Posted April 4, 2016 Pessoal, tem como imprimir array usando Report, Não encontrei exemplo Ronaldbuch 1 Quote Link to comment Share on other sites More sharing options...
Theotokos Posted April 4, 2016 Report Share Posted April 4, 2016 Procedure Prt_Ficha() * aCampos := { } * AADD(aCampos, {"Propriedade" , D_PROPRIED }) AADD(aCampos, {"numero" , StrZero(D_NUMERO,5) }) AADD(aCampos, {"cliente" , D_NOME }) AADD(aCampos, {"nascimento" , D_NASCIMEN }) AADD(aCampos, {"cpf" , D_CPF }) AADD(aCampos, {"rg" , D_RG }) AADD(aCampos, {"email" , D_EMAIL }) AADD(aCampos, {"telefone" , D_TELEFONE }) AADD(aCampos, {"celular" , D_CELULAR }) AADD(aCampos, {"endereco" , D_ENDERECO }) AADD(aCampos, {"bairro" , D_BAIRRO } ) AADD(aCampos, {"cidade" , D_CIDADE }) AADD(aCampos, {"cep" , D_CEP }) AADD(aCampos, {"filiação" , D_FILIACAO }) AADD(aCampos, {"conjuge" , D_CONJUGE }) AADD(aCampos, {"DtConjuge" , D_DTCONJUG }) AADD(aCampos, {"DtCasamento" , D_DTCASAME }) AADD(aCampos, {"uf" , D_ESTADO }) AADD(aCampos, {"cadastro" , D_CADASTRO }) AADD(aCampos, {"sexo" , D_SEXO}) AADD(aCampos, {"Naturalidade" , D_NATURALI }) AADD(aCampos, {"Inscr.Estadual" , D_IE }) AADD(aCampos, {"NIRF" , D_NIRF }) AADD(aCampos, {"CEI/CNPJ" , D_CEI_CNPJ }) AADD(aCampos, {"NFuncionario" , D_NFUNCION }) AADD(aCampos, {"Foto" , "FOTOS\C_"+StrZero(D_NUMERO,5)+".BMP" }) AADD(aCampos, {"TpAssociado" , D_TPSOCIO }) * nCopia := 1 * cCabecalho := "" aCabeca := {} aDados := {} For n1:=1 To Len(aCampos) AADD(aCabeca, aCampos[n1,1] ) AADD(aDados , aCampos[n1,2]) cCabecalho += aCampos[n1,1]+";" Next n1 * cCabecalho := SubStr(cCabecalho,1,Len(cCabecalho)-1) * 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("Ficha Cliente") //Titulo da Dialog no FastReports ******************************************************************* FrPrn:LoadLangRes( cDirFr+"BRAZIL.XML") ******************************************************************* //--> FrPrn:SetUserDataSet("aDados",cCabecalho, ; {||a1 := 1}, ; //--> bGoTop {||a1 := a1 + 1}, ; //--> bSkipPlus {||a1 := a1 - 1}, ; //--> bSkipMinus {||a1 > Len(aDados)}, ; //--> bCheckEOF {|aField1| cPesq1 := aField1, nCol := ASCAN(aCabeca,{|p1| p1 = cPesq1}),; aDados[nCol] } ) * FrPrn:PreviewOptions:SetAllowEdit( .F. ) FrPrn:PreviewOptions:SetZoomMode(1) FrPrn:PreviewOptions:SetOutlineExpand(.f.) * *FrPrn:PreviewOptions:SetMaximized(.f.) * DoFrAction("Ficha.fr3",,.T.,.f.) * FrPrn:ClearDataSets() //Inutiliza Todas as Informações de DataBase no FastReports * FrPrn:DestroyFR() //Fecha (ou 'Destroi') o Objeto do FastReports * Return nil Quote Link to comment Share on other sites More sharing options...
kapiaba Posted April 5, 2016 Report Share Posted April 5, 2016 Rone, usando Report. Quote Link to comment Share on other sites More sharing options...
crisvam Posted April 5, 2016 Report Share Posted April 5, 2016 Veja se resolve. nclude "FiveWin.ch" #include "report.ch" #include "dbstruct.ch" STATIC oReport, nField Function Rep15() LOCAL aStructure := DbStruct("Test.dbf") IF len(aStructure) == 0 MsgStop("Could not read Test.dbf structure") RETU NIL ENDIF nField := 1 REPORT oReport TITLE "*** TEST.DBF STRUCTURE ***","" PREVIEW COLUMN TITLE "Name" DATA aStructure[nField][DBS_NAME] SIZE 15 COLUMN TITLE "Type" DATA aStructure[nField][DBS_TYPE] SIZE 6 COLUMN TITLE "Len" DATA aStructure[nField][DBS_LEN] SIZE 3 TOTAL COLUMN TITLE "Decimals" DATA aStructure[nField][DBS_DEC] SIZE 8 END REPORT /* Just the following */ oReport:bSkip := {|| nField++} ACTIVATE REPORT oReport WHILE nField <= len(aStructure) RETURN NIL Este exemplo do fivewin, pasta Samples\Report\rep15.prg Quote Link to comment Share on other sites More sharing options...
Theotokos Posted April 5, 2016 Report Share Posted April 5, 2016 Rone, usando Report. Tem razão, li por cima e pensei em FastReport.... Quote Link to comment Share on other sites More sharing options...
atnsoft Posted April 6, 2016 Report Share Posted April 6, 2016 Assim: While(!Eof()) SysRefresh(); CursorWait() aadd(aImp, {Tabela->Codigo, Tabela->Nome, Tabela->Amb, Transform(Tabela->Ch * nValor,"@E 999,999.99")}) dbSkip() if (Tabela->Tabela != Pbusca) exit endifEnd nConta := 1Asort(aImp, , , {|x, y| x[1] < y[1]})Define Font oFont1 Name "Courier New" Size 0, -12if vPrevia REPORT oReport ; Title Trim(lLab)+" - "+Trim(lDesc),; "TABELA: "+Trim(Left(Pconvenio,37))+" - Pág: "+Str(oReport:nPage,3,0); Caption "Rel. Tabela" Font oFont1 PreView vArquivo := .F.endifif Varquivo REPORT oReport ; Title Trim(lLab)+" - "+Trim(lDesc),; "TABELA: "+Trim(Left(Pconvenio,37))+" - Pág: "+Str(oReport:nPage,3,0); Caption "Rel. Tabela" Font oFont1 To File (cDirDoc)+"Tabela.Txt"endifif (! vArquivo .and. ! vPrevia) REPORT oReport ; Title Trim(lLab)+" - "+Trim(lDesc),; "TABELA: "+Trim(Left(Pconvenio,37))+" - Pág: "+Str(oReport:nPage,3,0); Caption "Rel. Tabela" Font oFont1endifif vArquivo oReport:nTitleUpLine := 0 oReport:nTitleDnLine := 0endifColumn Title "CÓDIGO" DATA aImp[nConta,1] Size 06Column Title "DESCRIÇÃO" DATA aImp[nConta,2] Size 55Column Title " A.M.B." DATA aImp[nConta,3] Size 14Column Title "VALOR" DATA aImp[nConta,4] Right Size 12End Reportif ! vArquivo oReport:CellView()endifoReport:bSkip := {|| nConta ++}Activate Report oReport While nConta <= len(aImp)oFont1:End() 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.