- Code: Select all Expand view
Static Function RPed0101(dData1, dData2, cTip_Rela, cSib_Natu, oLbxPedm)
Local oReport, oFont1, oFont2, oFont3, oFont4, nRecno:=Pedm->(Recno())
DEFINE FONT oFont1 NAME "ARIAL" SIZE 0,-08
DEFINE FONT oFont2 NAME "ARIAL" SIZE 0,-08 BOLD
DEFINE FONT oFont3 NAME "ARIAL" SIZE 0,-06
DEFINE FONT oFont4 NAME "ARIAL" SIZE 0,-05
dbSelectArea( "Pedm" )
dbClearRelation( "Clie", {|| Pedm->Cli_Pedm} )
dbClearRelation( "Vend", {|| Pedm->Ven_Pedm} )
dbClearRelation( "Agen", {|| Pedm->Age_Pedm} )
dbClearRelation( "Tran", {|| Pedm->Tra_Pedm} )
dbClearRelation( "Cond", {|| Pedm->Con_Pedm} )
dbClearRelation( "Natu", {|| Pedm->Nat_Pedm} )
dbSelectArea( "Nota" )
dbSetRelation( "Clie", {|| Nota->Cli_Nota} )
dbSetRelation( "Vend", {|| Nota->Ven_Nota} )
dbSetRelation( "Agen", {|| Nota->Age_Nota} )
dbSetRelation( "Tran", {|| Nota->Tra_Nota} )
dbSetRelation( "Cond", {|| Nota->Con_Nota} )
dbSetRelation( "Natu", {|| Nota->Nat_Nota} )
DbSelectArea("Nota")
Nota->(DBSETORDER("Nota6"))
SR_SETFILTER("Dfi_Nota >= '"+dtos(dData1)+"' and Dfi_Nota <= '"+dtos(dData2)+"'")
REPORT oReport;
TITLE Alltrim(Empr->Nom_Empr), "RELATÓRIO PEDIDOS FATURADOS (SINTÉTICO) - PERÍODO: "+DtoC(dData1)+" a "+DtoC(dData2);
HEADER "EM: "+dtoc(date())+space(02)+time() RIGHT;
FOOTER "PÁGINA: "+strzero(oReport:nPage,3) CENTER;
FONT oFont1, oFont2, oFont3, oFont4 PREVIEW
GROUP ON Nota->Dfi_Nota ;
FOOTER "TOTAL NF DIA "+oReport:aGroups[1]:cValue+ ;
" ( "+ltrim(str(oReport:aGroups[1]:nCounter))+" )" ;
FONT 2
COLUMN TITLE "No.NF" ;
DATA Nota->Nfi_Nota+" "+Nota->Ser_Nota;
SIZE 10;
FONT 1
COLUMN TITLE "DATA NF";
DATA Nota->Dfi_Nota;
SIZE 08;
FONT 1
COLUMN TITLE "CLIENTE";
DATA Clie->Cod_Clie+"-"+Clie->Nom_Clie;
SIZE 40;
FONT 1
COLUMN TITLE "No.PEDIDO";
DATA Nota->Cod_Nota;
SIZE 10;
FONT 1
COLUMN TITLE "CFOP";
DATA Natu->Cod_Natu;
SIZE 05;
FONT 1
COLUMN TITLE "VLR.IPI";
DATA Nota->Ipi_Nota;
PICTURE "@E 9,999,999.99";
SIZE 09;
FONT 1;
TOTAL
COLUMN TITLE "VLR.NF";
DATA Nota->Val_Nota;
PICTURE "@E 999,999,999.99";
SIZE 09;
FONT 2;
TOTAL
COLUMN TITLE "S";
DATA Nota->Sta_Nota;
SIZE 02;
FONT 1
oReport:bInit := {|| Nota->(DbGoTop()) }
oReport:bSkip := {|| Nota->(DbSkip()) }
END REPORT
IF oReport:lCreated
oReport:cGrandTotal := "Total Geral"
oReport:cPageTotal := "Total da Página"
ENDIF
ACTIVATE REPORT oReport ON INIT CursorArrow() WHILE !Nota->(Eof()); //If(!lPer_Nota, !Nota->(Eof()) .and. (Nota->Dfi_Nota>=dData1 .and. Nota->Dfi_Nota<=dData2), !Nota->(Eof()) );
ON STARTGROUP oReport:NewLine();
FOR If(Left(cTip_Rela,2)="UN", Nota->Ser_Nota="UN", Iif(Left(cTip_Rela,2)="MP", Nota->Ser_Nota="MP" .or. Nota->Ser_Nota="CP", Nota->Ser_Nota#"ZZ")) .and. Nota->Sta_Nota=cSib_Natu
// ON STARTPAGE oReport:SayBitmap(.1,.1, cFot_Emp,1.5,.5)
oFont1:End()
oFont2:End()
oFont3:End()
oFont4:End()
dbClearRelation("Clie", {|| Nota->Cli_Nota})
dbClearRelation("Vend", {|| Nota->Ven_Nota})
dbClearRelation("Agen", {|| Nota->Age_Nota})
dbClearRelation("Tran", {|| Nota->Tra_Nota})
dbClearRelation("Cond", {|| Nota->Con_Nota})
dbClearRelation("Natu", {|| Nota->Nat_Nota})
Nota->(DBSETORDER("Nota2"))
SR_SETFILTER("")
dbSelectArea("Pedm")
dbSetRelation("Clie", {|| Pedm->Cli_Pedm})
dbSetRelation("Vend", {|| Pedm->Ven_Pedm})
dbSetRelation("Agen", {|| Pedm->Age_Pedm})
dbSetRelation("Tran", {|| Pedm->Tra_Pedm})
dbSetRelation("Cond", {|| Pedm->Con_Pedm})
dbSetRelation("Natu", {|| Pedm->Nat_Pedm})
Pedm->(dbGoto(nRecno))
oLbxPedm:SetFocus()
oLbxPedm:Refresh()
Return nil
*Visualización normal en Excel FWH1308
*Visualización normal en Preview FWH1306
* esto ocurre en otros informes tambien
alguien podría ayudarme con este problema.