(Q1) What are the main technical differences between the C/AL Engine report and the advanced AL Reporting

The first difference is in buffer generation.

In the AL version, it is mandatory to invoke buffer generation if the report is from the report engine and then run it. For example:

IF ReportBufferMgt.TryPrepareBuffer(TempReportSelections."Report ID", RecordVariant, TempReportSelections."Report Setup Code") THEN
    report.RunModal(TempReportSelections."Report ID", IsGUI, FALSE)
ELSE
    report.RunModal(TempReportSelections."Report ID",IsGUI,FALSE,RecVarToPrint);

This means that the buffer is generated before the “Report Setup” is chosen, and then the report must choose which rows to print and which do not.

The AL version resumes classic printing and is fully compatible with the Report.Runmodal() without the need to populate any buffers.

This is solved by adding “fake dataitem” like this in the “fake dataitem” reports:

dataitem(FakeSalesHeader; "Sales Header")
{
    DataItemTableView = sorting ("Document Type", "No.");
    Description = 'Fake Sales Header, Only for Report Selection Integration';
    trigger OnPreDataItem()
    begin
        CurrReport.Break();
    end;
}

They are only intended to receive the filtered table from outside and allow it to be analyzed later to understand which record to print:

AdvRptRoutines.GetDocumentToPrint(FakeSalesHeader, DocVariant):

With the limitation of being able to use this approach only on expected tables (but each report includes the top 14), it makes processing transparent.

The buffer is then generated only after the user has chosen the setup report on the request page, so the dataset to be printed is actually the final processing.

(Q2) What is the processing sequence in the report buffer generation?

This diagram shows how internally the various events that we can integrate with are raised internally.

In the schema, acid green processes are layout events and blue processes are classic events.

Event Invocation Diagram


EOS Labs -