Why do you need this change?
Create event to modify the layout state before printing but after a runmodal with the new method (Report Layout List 2000000234)
Describe the request
In CU44, there's a "FetchReportLayoutByCode" function to modify the layout before printing but after a runmodal.
Use with the old "Custom Report Layout". I can call a custom report before launching a report.
[EventSubscriber(ObjectType::Codeunit, Codeunit::ReportManagement, OnFetchReportLayoutByCode, '', false, false)]
local procedure OnFetchReportLayoutByCode(ObjectId: Integer; LayoutCode: Text; var TargetStream: OutStream; var IsHandled: Boolean)
var
CustomReportLayout: Record "Custom Report Layout";
TempBlobIn: codeunit "Temp Blob";
TempInStream: InStream;
lSingleInstance: Codeunit "NVW NaviWest SingleInstance";
begin
LayoutCode := lSingleInstance.GetLayout();
if not CustomReportLayout.Get(LayoutCode) then
LayoutCode := '';
if LayoutCode <> '' then begin
CustomReportLayout.GetLayoutBlob(TempBlobIn);
TempBlobIn.CreateInStream(TempInStream);
CopyStream(TargetStream, TempInStream);
IsHandled := true;
end;
end;
With the new method (Report Layout List 2000000234), is it possible to create a "OnFetchReportLayoutByCode" event to modify the layout state before printing but after a runmodal ? I haven't found a solution.
Why do you need this change?
Create event to modify the layout state before printing but after a runmodal with the new method (Report Layout List 2000000234)
Describe the request
In CU44, there's a "FetchReportLayoutByCode" function to modify the layout before printing but after a runmodal.
Use with the old "Custom Report Layout". I can call a custom report before launching a report.
With the new method (Report Layout List 2000000234), is it possible to create a "OnFetchReportLayoutByCode" event to modify the layout state before printing but after a runmodal ? I haven't found a solution.