Академический Документы
Профессиональный Документы
Культура Документы
Registrar
Fórum
Protheus/Microsiga/Totvs
ADVPL
IMPRESSAO DE RELATORIO TREPORT
Linguagem de Programação ADVPL
Árvore Indentado
ABS
O administrador desabilitou o acesso público de escrita.
// ALERT("ENTREI NO RELATORIO")
oReport := TReport():New("RELFUNC","RELAÇÃO DE
FUNCIONÁRIOS",cPerg,{|oReport| PrintReport(oReport)},"Este relatorio
ira imprimir a relacao de Funcionarios")
oReport:SetPortrait()
oReport:SetTotalInLine(.F.)
oReport:ShowHeader()
oSection1 := TRSection():New(oReport,"Filial",{"SRA"})
oSection1:SetTotalInLine(.F.)
DbSelectArea('SRA')
dbGoTop()
oReport:SetMeter(SRA->(RecCount()))
While SRA->(!Eof())
If oReport:Cancel()
Exit
EndIf
oReport:IncMeter()
If !( SRA->RA_SITFOLH $ cSituacao )
SRA->(dbSkip(1))
Loop
EndIf
oSection1:Cell("RA_CC"):SetValue(SRA->RA_CC)
oSection1:Cell("RA_CC"):SetAlign("CENTER")
DbSelectArea('CTT')
DBSETORDER(1)
DBGOTOP()
DBSEEK(xFilial("CTT")+SRA->RA_CC)
oSection1:Cell("CTT_DESC01"):SetValue(CTT->CTT_DESC01)
oSection1:Cell("CTT_DESC01"):SetAlign("LEFT")
DbSelectArea('SRA')
oSection1:Cell("RA_SITFOLH"):SetValue(SRA->RA_SITFOLH)
oSection1:Cell("RA_SITFOLH"):SetAlign("CENTER")
oSection1:Cell("RA_MAT"):SetValue(SRA->RA_MAT)
oSection1:Cell("RA_MAT"):SetAlign("CENTER")
oSection1:Cell("RA_NOME"):SetValue(SRA->RA_NOME)
oSection1:Cell("RA_NOME"):SetAlign("LEFT")
oSection1:Cell("RA_ADMISSA"):SetValue(SRA->RA_ADMISSA)
oSection1:Cell("RA_ADMISSA"):SetAlign("LEFT")
oSection1:Cell("RA_SALARIO"):SetValue(SRA->RA_SALARIO)
oSection1:Cell("RA_SALARIO"):SetAlign("RIGHT")
oSection1:Cell("RA_CODFUNC"):SetValue(Posicione("SRJ",1,xFilial("SR
J")+SRA->RA_CODFUNC,"RJ_DESC"))
oSection1:Cell("RA_CODFUNC"):SetAlign("LEFT")
oSection1:PrintLine()
dbSelectArea("SRA")
SRA->(dbSkip())
EndDo
oSection1:Finish()
Return
*************************************************************
*****************
Static Function ValidPerg()
*************************************************************
*****************
_sAlias := Alias()
dbSelectArea("SX1")
dbSetOrder(1)
aRegs:={}
aAdd(aRegs,{cPerg,"01","Matricula
De ?","","","MV_CH1","C",06,00,0,"G","","MV_PAR01","","","","","","",""
,"","","","","","","","","","","","","","","","","","SRA","","",""})
aAdd(aRegs,{cPerg,"02","Matricula
Ate ?","","","MV_CH2","C",06,00,0,"G","","MV_PAR02","","","","","","","
","","","","","","","","","","","","","","","","","","SRA","","",""})
aAdd(aRegs,{cPerg,"03","Centro de Custo
De ?","","","MV_CH3","C",09,00,0,"G","","MV_PAR03","","","","","","",""
,"","","","","","","","","","","","","","","","","","CTT","","",""})
aAdd(aRegs,{cPerg,"04","Centro de Custo
Ate ?","","","MV_CH4","C",09,00,0,"G","","MV_PAR04","","","","","","","
","","","","","","","","","","","","","","","","","","CTT","","",""})
aAdd(aRegs,
{cPerg,"05","Situacoes ?","","","MV_CH5","C",05,00,0,"G","fSituacao","M
V_PAR05","","","","","","","","","","","","","","","","","","","","","","","","","
","","",""})
aAdd(aRegs,{cPerg,"06","Função
De ?","","","MV_CH6","C",06,00,0,"G","","MV_PAR06","","","","","","",""
,"","","","","","","","","","","","","","","","","","SRJ","","",""})
aAdd(aRegs,{cPerg,"07","Função
Ate ?","","","MV_CH7","C",06,00,0,"G","","MV_PAR07","","","","","","","
","","","","","","","","","","","","","","","","","","SRJ","","",""})
dbSelectArea(_sAlias)
Return