[Event Request] Codeunit 9651 "Document Report Mgt."
Hi there,
Long time ago (see [Event Request] Table 77 Report Selection, SaveReportAsPDF #2353) I started to develop a module to merge company specific stationery (pdf) to a report (Sales Invoice, Order Confirmation, etc.) created from BC. That time I requested a new event publisher, but to honest, at the wrong place. @StanPesotskiy guided me that time to use OnBeforeMergeDocument publisher in Document Report Mgt. codeunit and initially it looked good. Because of other projects I needed to postpone and when I continued I found out, that I can't use this or any other existing publisher, because at this time you're handling with word files/streams only.
Therefor I would like to request the following modifications.
- Please add the ReportID (integer) as an Parameter to ConvertToPdf() procedure.
- Add a OnAfter publisher inside of ConvertToPdf()
local procedure ConvertToPdf(var TempBlob: Codeunit "Temp Blob"; ReportID: Integer)
begin
if not TryConvertWordBlobToPdf(TempBlob) then
Error(CompanyInformationPicErr);
OnAfterConvertToPdf(TempBlob, ReportID);
end;
[IntegrationEvent(false, false)]
local procedure OnAfterConvertToPdf(var TempBlob: Codeunit "Temp Blob"; ReportID: Integer)
begin
end;
There are just two references calling ConvertToPdf procedure, one in PrintWordDoc() and one in MergeWordLayout(). At both you already have the ReportID.
It would be great If you could at this small change.
Thanks in advance.
Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.
Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.