|
Webdev - Impressao da tabela como PDF |
Started by adrianoboller, Jul., 02 2015 6:18 PM - 4 replies |
| |
| | | |
|
| |
Posted on July, 02 2015 - 6:18 PM |
//Codigo em Botão
sFileName is string sFileName = WS_ReturnGenerationDir()+"\Pessoal"+ gnConvenioAdministrador +".pdf" iDestination(iGenericPDF, sFileName) TablePrint(TABLE_QRY_Select_Usuarios) FileDisplay(sFileName,"application/unknown",sFileName) fDelete(sFileName) |
| |
| |
| | | |
|
| | |
| |
Registered member 3,659 messages Popularité : +175 (223 votes) |
|
Posted on March, 07 2016 - 3:40 PM |
Outro exemplo:
ok is boolean = False CAB is int = 0 Lineprint is string = "" sFileName is string = ""
ok = HExecuteQuery(QRY_Select_OrcamentoItem,hQueryDefault+hWithFilter,gnClienteAdministrador, GloAno) IF ok = True THEN FOR EACH QRY_Select_OrcamentoItem
IF CAB = 0 THEN CAB = 1 Lineprint = "ClienteCliente; DataOrcamento; AnoOrcamento; NumeroOrcamento; QuantidadItems; ValorBruto; Valor; NotaFiscal"+Charact(13)+Charact(10) END Lineprint += QRY_Select_OrcamentoItem.ClienteCliente +";" Lineprint += DateToString(QRY_Select_OrcamentoItem.DataOrcamento,maskSystemDate) +";" Lineprint += QRY_Select_OrcamentoItem.AnoOrcamento +";" Lineprint += QRY_Select_OrcamentoItem.NumeroOrcamento +";" Lineprint += QRY_Select_OrcamentoItem.QuantidadeItems +";" Lineprint += QRY_Select_OrcamentoItem.ValorBruto +";" Lineprint += QRY_Select_OrcamentoItem.Valor +";" Lineprint += QRY_Select_OrcamentoItem.NotaFiscal + Charact(13)+Charact(10) END END
Lineprint = Replace(Lineprint,".",",")
IF ok = True sFileName = WS_ReturnGenerationDir() + "OrcamentoItem"+ gnClienteAdministrador +".csv" fSaveBuffer(sFileName,Lineprint) iDestination(iGenericXLS,sFileName) FileDisplay(sFileName,"application/unknown","OrcamentoItem"+ gnClienteAdministrador +".csv") fDelete(sFileName) END
-- Adriano José Boller ______________________________________________ Consultor e Representante Oficial da PcSoft no Brasil +55 (41) 9949 1800 adrianoboller@gmail.com skype: adrianoboller http://wxinformatica.blogspot.com.br/ |
| |
| |
| | | |
|
| | |
| |
Registered member 3,659 messages Popularité : +175 (223 votes) |
|
Posted on March, 07 2016 - 3:45 PM |
PDF
GloCabecalho = "Cliente: "+ gnClienteAdministrador sFileName is string sFileName = WS_ReturnGenerationDir() + "Orcamento"+ gnClienteAdministrador+"_"+GloAno +".pdf" iDestination(iGenericPDF,sFileName) iInitReportQuery(RPT_Orcamentos,gnClienteAdministrador,GloAno) iPrintReport(RPT_Orcamentos,gnClienteAdministrador,GloAno) FileDisplay(sFileName,"application/unknown", "Orcamento"+ gnClienteAdministrador+"_"+GloAno +".pdf") fDelete(sFileName)
-- Adriano José Boller ______________________________________________ Consultor e Representante Oficial da PcSoft no Brasil +55 (41) 9949 1800 adrianoboller@gmail.com skype: adrianoboller http://wxinformatica.blogspot.com.br/ |
| |
| |
| | | |
|
| | |
| |
Registered member 3,659 messages Popularité : +175 (223 votes) |
|
Posted on March, 07 2016 - 5:00 PM |
Se ocorrer esse Erro:
Ajuste a ser feito:
-- Adriano José Boller ______________________________________________ Consultor e Representante Oficial da PcSoft no Brasil +55 (41) 9949 1800 adrianoboller@gmail.com skype: adrianoboller http://wxinformatica.blogspot.com.br/ |
| |
| |
| | | |
|
| | |
| |
Registered member 3,659 messages Popularité : +175 (223 votes) |
|
Posted on March, 07 2016 - 6:04 PM |
FUNÇÃO DE REDIRECT DE DIRETORIO PARA USO NOS RELATORIOS COM WEBDEV
Procedure WS_ReturnGenerationDir()
sGenDir is string
sGenDir = fDataDir()+ "\gen\" IF fDirectoryExist(sGenDir) = False THEN fMakeDir(sGenDir) END sGenDir = sGenDir + gnConvenioAdministrador +"_"+ gnSeqAutorzAdministrador +"\" IF fDirectoryExist(sGenDir) = False THEN fMakeDir(sGenDir) END
RESULT sGenDir
EXEMPLO DE USO:
GloCabecalho = "Convênio: "+ gnConvenioAdministrador sFileName is string sFileName = WS_ReturnGenerationDir() + "Fechamento"+ gnAdministrador+"_"+GloAno +".pdf" iDestination(iGenericPDF,sFileName) iInitReportQuery(RPT_Fechamento,gnAdministrador,GloAno) iPrintReport(RPT_Fechamento,gnAdministrador,GloAno) FileDisplay(sFileName,"application/unknown", "Fechamento"+ gnAdministrador+"_"+GloAno +".pdf") fDelete(sFileName)
-- Adriano José Boller ______________________________________________ Consultor e Representante Oficial da PcSoft no Brasil +55 (41) 9949 1800 adrianoboller@gmail.com skype: adrianoboller http://wxinformatica.blogspot.com.br/ |
| |
| |
| | | |
|
| | | | |
| | |
|