Hi all

I need to send invoices in PDF, The idea is to read it from CACHE of reports, but when generating it in PDF, it always shows it on the screen

I also want to generate it with the ID.pdf and not with the UUID code, but I think I'm changing it later and not before.

Move (sCacheFolder+String(NmEmplds.Cedula)+'.pdf') to sFileName
Send ExportReport C_drPDF sFileName


We may want for some reports to change the cache early

Code:
  Procedure SetOutputDestination
            String sOutputOption sFileName sCacheFolder
            Get pMedioSalida to sOutputOption  
           
         //   WebGet psValue of oOutputToComboNM to sOutputOption 
            Move "F" to sOutputOption
            Case Begin
                Case (sOutputOption = "V")
                    Register_Object oReportResults
                    Set phoReportViewer to oReportResults
                    Case Break
                Case (sOutputOption = "T")
                    Set phoReportViewer to 0
                    Set peBrowserTarget to btNewTab
                    Case Break
                Case (sOutputOption = "N")
                    Set phoReportViewer to 0
                    Set peBrowserTarget to btNewWindow
                    Case Break
                Case (sOutputOption = "S")
                    Set phoReportViewer to 0
                    Set peBrowserTarget to btCurrentWindow
                    Case Break   
                Case (sOutputOption="F")    
                    Get ReportCacheFileName  '.pdf' to sFileName
                     If (sFileName <> "") Begin   
                         Send ExportReport  C_drPDF sFileName 
                     End
                 
                     Case Break
            Case End
        End_Procedure
Thanks

EDgar