==============================================
ChangeTarget(NewBrowser) // abre uma nova guia
==============================================
//Imprime Em pdf
// Generate a unique PDF file name
AFile is string
AFile = fWebDir() + "\" + DateSys() + TimeSys() + ".pdf"
// Configure the destination of the print
iDestination(iPDF, AFile)
// Print the RPT_InvoicePDF report
iPrintReport(RPT_tecnico)
// Send the file to the browser
FileDisplay(AFile, "application/pdf")
// Delete the file
fDelete(AFile)
==============================================
// Mostra o relatorio no browse Html
// Generate a unique HTML file name
FilePath is string
FilePath = fWebDir() + "\" + DateSys() + TimeSys() + ".htm"
// Configure the destination of the print
iDestination(iHTML, FilePath)
// Print the RPT_InvoiceHTML report
iPrintReport(RPT_tecnico)
// Extract the name and extension of the generated file
FileName is string
FileName = fExtractPath(FilePath, fFileName + fExtension)
// Send the file to the browser
PageDisplay(FileName)
==============================================
//Grava em Pdf o Relatorio
// Generate a unique PDF file name
AFile is string = fWebDir() + "\" + DateSys() + TimeSys() + ".pdf"
// Configure the destination of the print
iDestination(iPDF, AFile)
// Print the RPT_OrderPDF report
iPrintReport(RPT_tecnico)
// Propose to download the file
// The file name proposed by default will be "Order.pdf"
FileDisplay(AFile, "application/pdf", "NomedoRelatorio.pdf")
// Delete the file
fDelete(AFile)
==============================================
Nenhum comentário:
Postar um comentário