With Microsoft Dynamics NAV 2015 Microsoft introduced a great new property on the Report object: Temporary.
This behaves the same as the SoureTableTemporary property on a page and basically eliminates the need of using integer dataitems and loops on reports.
It also makes it easier to use Query as a datasource for a report like I did for a page in this post:
Lets repeat this exercise. We will use the same Query and Temporary Table and use in on a report instead.
The query combines sales information from the Value entries per customer.
And we create a class for the query as a table.
We need to define the table on a report and activate the new property
And since the table is now empty we need to populate it like the table on the page like this:
Then after we created a Layout for the report: