Table 77 report selections SaveReportAsPdf function event OnBeforeSaveReportAsPDF
in table 77 Report Selections there is the function "SaveReportAsPdf":
"OnBeforeSetReportLayout(RecordVariant); FilePath := COPYSTR(FileMgt.ServerTempFileName('pdf'),1,250);
ReportLayoutSelection.SetTempLayoutSelected(LayoutCode); OnBeforeSaveReportAsPDF(ReportID,RecordVariant,LayoutCode,IsHandled); IF NOT IsHandled THEN REPORT.SAVEASPDF(ReportID,FilePath,RecordVariant); ReportLayoutSelection.SetTempLayoutSelected('');
COMMIT;"
is it possible to add the variable "FilePath" to the parameters for the "OnBeforeSaveReportAsPDF" event? so that we can interact and create the PDF file on the correct location so that further handling is possible?
No, we cannot provide access to Server File Path, as this is temporary path and you do not have access to this path due to security reasons.
And then what is the purpose of this event? In this case, it is useless. You can do this using tempblob as suggested in another thread.
the point is that now it is not possible to make a pdf file on an other way than saveaspdf. we have a processing only report (so saveaspdf doesn't work) that generates a pdf file but we do not have a way to pass that pdf file to fourther processing (for example adding as mail attachment) a tempblob like suggested would be possible.