ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

Table 77 report selections SaveReportAsPdf function event OnBeforeSaveReportAsPDF

Open bartpattijn opened this issue 7 years ago • 3 comments

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?

bartpattijn avatar Apr 26 '19 06:04 bartpattijn

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.

AlexanderYakunin avatar May 08 '19 07:05 AlexanderYakunin

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.

slavikdem avatar Feb 17 '20 20:02 slavikdem

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.

bartpattijn avatar Feb 18 '20 07:02 bartpattijn