Skip to content

Event OnFetchReportLayoutByCode missing #30288

Description

@CyrilleJsmt

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    missing-infoThe issue misses information that prevents it from completion.

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions