O'Reilly logo

Extending Microsoft Dynamics NAV 2016 Cookbook by Alexander Drogin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Writing C/AL code in a report

The report designed in the previous example retrieved data from a database table and presented the result without extra manipulation. It is as simple as that, when the data the users require does not have to be transformed.

Getting ready

The file name in the source files is REP50020_SalesByCustomerItem.txt.

How to do it...

Now we will create a report that collects aggregated data into a temporary record to calculate values that cannot be retrieved from a table directly. Aggregated values are computed by C/AL code executed in report triggers.

  1. Create a report object in NAV Object Designer.
  2. Declare a global variable TempValueEntry of Record type and SubType = Value Entry. This is a temporary buffer where aggregated report ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required