how to limit no of rows when generating report in dynamic 365 business central AL

312 Views Asked by At

The operation has been canceled because the number of processed rows exceeded the maximum allowed number of rows (500000). Refine your filters to include less data and try again. I got this error when I generate report in dynamic 365 business central AL

I got this error when I generate report in dynamic 365 business central AL

3

There are 3 best solutions below

0
Dreeze On

The maximum allowed number of rows in reports is configurable on the Business Central server. More information can be found in the documentation under this link: Configure Server Instance (Reports section, value ReportMaxRows).

0
XMehdi01 On

You can use MaximumDatasetSize which sets the maximum amount of rows to be included on the report. And this property will override the hard limit that is set by the Default Max Rows (500000) for Report which setting for Business Central Server instance.

0
Meli On

Under the Global Properties of the AL Report, include the MaximumDatasetSize = x; as one of the properties , where x is an integer specifying the maximum length of the rows you want to be generated.

Below is the sample AL Report source code.

report 1 "Report Name"
{
    DefaultLayout = RDLC;
    MaximumDatasetSize = 1000000;
    RDLCLayout = '.\Path\Report Layout Name.rdl';
    dataset
    {
        dataitem(TableVariableName; "Table Name")
        {
            column(column1; column1) { }
            column(column2; column2) { }
        }
    }
}