Perguntas Relatorio em Treport com assinatura de responsável.

Mais
6 anos 4 meses atrás #32412 por flavianoan
Boa tarde, pessoal.
Estou desenvolvendo um relatório e gostaria de por uma linha para a assinatura do responsável.
alguém poderia me da uma ajuda de como fazer.

obrigado a todos.
#INCLUDE "rwmake.ch"
#INCLUDE "TOTVS.CH"
#INCLUDE "Topconn.ch"
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++
|FLAVIANO:26/06/2015
|DOCUMENTO AUXILIAR DE SEPERAÇAO DE PEDIDO
|/*======================================================*/

User Function AREL02()
Local oReport
Private cPerg := 'Arel02'

CriaSx1(cPerg)
// Pergunte(cPerg,.T.)

oReport := ReportDef()
oReport:PrintDialog()

Return
Static Function ReportDef()
Local oReport
Local oSection1
Local oSection2

oReport := TReport():New("ARELO2","DOCUMENTO AUXILIAR DE SEPERAÇAO DE PEDIDO","Arel02",{|oReport| PrintReport(oReport)},"DOCUMENTO AUXILIAR DE SEPERAÇAO DE PEDIDO")
//oreport:nfontbody:=12 //tamanho da fonte
//oreport:cfontbody:="Arial" //tipo da fonte
oSection1 := TRSection():New(oReport,"PEIDO",{"QRY"} ) //secao 1
TRCell():New (oSection1,"C9_PEDIDO", "QRY","Pedido",,,, )
TRCell():New (oSection1,"A1_NOME", "QRY","Cliente",,,, )
oSection2 := TRSection():New(oSection1,"Itens","QRY")

TRCell():New(oSection2,"B1_COD","QRY","Codigo") // Seçao 2
TRCell():New(oSection2,"B1_DESC","QRY","Produto",,50,,)
TRCell():New(oSection2,"C9_QTDLIB","QRY","QTD",,,)
TRCell():New(oSection2,"C9_LOTECTL","QRY","LOTE",,,)
TRcell():New(oSection2,"C9_PRCVEN","QRY", "VALOR",,,)
// totalizadores
TRFunction():New(oSection2:Cell("C9_QTDLIB"),NIL,"SUM") // funçao que mostra a quantidade de pedidos
TRFunction():New(oSection2:CELL("C9_PRCVEN"),NIL,"SUM")
// secao tres
oSection3 := TRSection():New(oSection1,"Obsservaçao",)
TRCell():New (oSection3,,,"Reponsavel",,,, )
oSection1:SetPageBreak(.T.)


Return oReport
Static Function PrintReport(oReport)
Local oSection1 := oReport:Section(1)
Local oSection2 := oReport:Section(1):Section(1)
Local oSection3 := oReport:Section(1):Section(1)
Local cQuery := ""
cQuery += " SELECT " + CRLF
cQuery += " C9_PEDIDO ," + CRLF
cQuery += " A1_NOME ," + CRLF
cQuery += " B1_COD ," + CRLF
cQuery += " B1_DESC ," + CRLF
cQuery += "C9_QTDLIB ," + CRLF
cQuery += " C9_LOTECTL ," + CRLF
cQuery += "C9_PRCVEN " + CRLF
cQuery += " FROM " + RetSqlName("SC9") +" SC9 " + CRLF
cQuery += " JOIN " + RetSqlName("SB1") +" SB1 ON SB1.B1_COD = SC9.C9_PRODUTO AND SB1.D_E_L_E_T_ = ''" + CRLF
cQuery += " JOIN " + RetSqlName("SA1") +" SA1 ON SA1.A1_COD = SC9.C9_CLIENTE"+CRLF
cQuery += " WHERE SC9.C9_FILIAL = '" + xFilial ("SC9") + "'
cQuery += " AND SC9.D_E_L_E_T_ = ' '" + CRLF
cQuery += " AND SC9.C9_PEDIDO = '" + mv_par01 + "' " + CRLF
cQuery += " ORDER BY B1_COD "
cQuery := ChangeQuery(cQuery)

If Select("QRY") > 0
Dbselectarea("QRY")
QRY->(DbClosearea())
EndIf


TCQUERY cQuery Alias QRY New

oSection1:Print()
Return

Static Function CriaSx1(cPerg)
PutSx1(cPerg,"01","PEDIDO" ,"PEDIDO" ,"PEDIDO" ,"mv_ch1","C",06,0,0,"G","","SC9","","","mv_par01")

return

Por favor Acessar ou Registrar para participar da conversa.

Tempo para a criação da página:0.091 segundos
Joomla templates by a4joomla