microsoft / ALAppExtensions

Repository for collaboration on Microsoft AL application add-on and localization extensions for Microsoft Dynamics 365 Business Central.
MIT License
795 stars 622 forks source link

[Event Request] SwissQRBill app codeunit 11518 "Swiss QR-Bill Mgt." procedure ReportPrintToStream #27363

Closed ViktorasDanielius closed 1 week ago

ViktorasDanielius commented 1 month ago

Describe the request

Please add new event to SwissQRBill app codeunit 11518 "Swiss QR-Bill Mgt." procedure ReportPrintToStream

    local procedure ReportPrintToStream(var SwissQRBillBuffer: Record "Swiss QR-Bill Buffer"; var PDFFileTempBlob: Codeunit "Temp Blob") Result: Boolean
    var
        SwissQRBillPrint: Report "Swiss QR-Bill Print";
        PDFFileOutStream: OutStream;
        // NEW VARIABLE
        IsHandled: Boolean;
    begin
        //>> NEW EVENT
        OnBeforeReportPrintToStream(SwissQRBillBuffer, PDFFileTempBlob, Result, IsHandled);
        if IsHandled then
            exit(Result);
        //<< NEW EVENT

        SwissQRBillPrint.SetBuffer(SwissQRBillBuffer);
        PDFFileTempBlob.CreateOutStream(PDFFileOutStream);
        exit(SwissQRBillPrint.SaveAs('', ReportFormat::Pdf, PDFFileOutStream));
    end;
    [IntegrationEvent(false, false)]
    local procedure OnBeforeReportPrintToStream(var SwissQRBillBuffer: Record "Swiss QR-Bill Buffer"; var PDFFileTempBlob: Codeunit "Temp Blob"; var Result: Boolean; var IsHandled: Boolean)
    begin
    end;

Additional context

Our requirement is to use updated version of "Swiss QR-Bill Print" report, so we want to use different report instead of standard one. Internal work item: AB#554313

JesperSchulz commented 1 week ago

Availability update: We will publish a fix for this issue in the next update for release 25.

Build ID to track: 26720.