Using multiple data items
In our first report, we used the Customer table as the data item. In many reports you will want to use multiple data items. For example in document reports like the sales invoice, there will be multiple data items. It's important to understand the effects of using multiple data items, especially how the dataset is constructed.
At runtime the data items are processed, like they are processed in a classic report. After the data items are processed, a dataset is created containing the results of the combination of data items. This dataset is always a flat dataset. It consists of columns and rows. The columns correspond to the fields used on the section(s) and the rows correspond to the records from the database.
While processing the data items, properties like DataItemTableView
are applied. Also, any C/AL code in the data item triggers is also applied. You can use these properties and triggers to filter the data item or make calculations.
As an example, let's use two...