Design the request page

Completed

By default, when you add a data item to the report dataset, this data item becomes available in the request page of the report.

For example, if you have the following dataset:

    dataset
    {
        dataitem(Customer; Customer)
        {
            column(CustomerNo; "No.")
            {
            }
            column(CustomerName; Name)
            {
            }
            column(City; City)
            {
            }
            column(BalanceLCY; "Balance (LCY)")
            {
            }
        }
    }

Then the following request page is generated when you run the report.

Screenshot of the generated request page.

The main Filter section shows the default filter fields that you use to delimit which records to include in the report. To add a filter, choose the + Filter action, type the name of the field that you want to filter by, or pick a field from the drop-down list.

In the Filter totals by section, you can adjust various dimensions that influence calculations in the report. To add a filter, choose the + Filter action, type the name of the field that you want to filter by, or pick a field from the drop-down list.

When you change the report dataset as follows:

    dataset
    {
        dataitem(Customer; Customer)
        {
            PrintOnlyIfDetail = true;
            column(CustomerNo; "No.")
            {
            }
            column(CustomerName; Name)
            {
            }
            dataitem(CustomerLedgers; "Cust. Ledger Entry")
            {
                DataItemLinkReference = Customer;
                DataItemLink = "Customer No." = field("No.");
                column(CustomerLedgersCustomerNo; "Customer No.")
                {
                }
                column(CustomerLedgersAmountLCY; "Amount (LCY)")
                {
                }
            }
        }
    }

Then the following request page is generated when you run the report.

Screenshot of the generated request page with multiple table filters.

As you can see, an extra table has been added to the request page, allowing users to also apply filters on the second table that was added to the dataset. However, this isn't always the desired behavior. Adding all the tables from the report dataset to the request page can confuse some of your users. That is why you can design the request page using report properties to determine how it needs to be generated.

You can design the filters on request pages using the following report properties:

  • RequestFilterHeading

    This report property sets a caption for the request page tab that is related to a report's data item or an XMLport's table element.

  • RequestFilterHeadingML

    This report property sets the text used as a RequestFilterHeading property for a request page tab.

  • RequestFilterFields

    This report property specifies which fields are automatically included on the tab of the request page that is related to to a report's data item or an XMLport's table element. The user can set filters on these fields.

  • UseRequestPage

    Sets whether a request page is presented to the user. If UseRequestPage is false, then a request page isn't shown. The user can't choose a sort order or set any filters.

By default, for every data item in the report, a FastTab for defining filters and sorting is created on the request page. To remove a FastTab from a request page, don't define any RequestFilterFields for the data item or table element and set the DataItemTableView property in a report to define sorting. The request page is displayed, but there is no tab for this data item or table element.

For example, when you add a sorting in the second data item using the DataItemTableView property:

    dataset
    {
        dataitem(Customer; Customer)
        {
            PrintOnlyIfDetail = true;
            column(CustomerNo; "No.")
            {
            }
            column(CustomerName; Name)
            {
            }
            dataitem(CustomerLedgers; "Cust. Ledger Entry")
            {
                DataItemLinkReference = Customer;
                DataItemLink = "Customer No." = field("No.");
                DataItemTableView = sorting("Customer No.");
                column(CustomerLedgersCustomerNo; "Customer No.")
                {
                }
                column(CustomerLedgersAmountLCY; "Amount (LCY)")
                {
                }
            }
        }
    }

Then the following request page is generated when you run the report.

Screenshot of the generated request page with the table removed.

So, the Cust. Ledger Entry table is no longer displayed on the request page.

The fields that you define as RequestFilterFields are shown on the request page and can be used for filtering the data before viewing or printing the report. Defining the RequestFilterFields property in the dataitem() part of the report code is done as illustrated in the following code example.

   dataset
    {
        dataitem(Customer; Customer)
        {
            PrintOnlyIfDetail = true;
            RequestFilterFields = "No.", "Search Name", "Customer Posting Group";
            column(CustomerNo; "No.")
            {
            }
            column(CustomerName; Name)
            {
            }
            dataitem(CustomerLedgers; "Cust. Ledger Entry")
            {
                DataItemLinkReference = Customer;
                DataItemLink = "Customer No." = field("No.");
                DataItemTableView = sorting("Customer No.");
                column(CustomerLedgersCustomerNo; "Customer No.")
                {
                }
                column(CustomerLedgersAmountLCY; "Amount (LCY)")
                {
                }
            }
        }
    }

The following request page is generated when you run the report.

Screenshot of the generated request page with fields added.

It is recommend that you add fields that end users of the report will frequently set filters on.