O'Reilly logo

Microsoft Dynamics NAV 2015 Professional Reporting by Steven Renders

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

Typical expression examples

Now that we know how to create expressions and custom functions, let's have a look at some typical examples of how expressions can help us achieve our goals when creating reports.

Working with dates

The following function can be used to display the current date:

=Today()

The following function can be used to calculate new dates based upon an existing date:

=DateAdd(DateInterval.Month, 6, Parameters!ExpirationDate.Value)

In this example, starting from the expiration date, you add 6 months to it to calculate a new date. The number 6 can be any number and, when it is negative, you can subtract periods from a date. DateInterval contains Year, Month, Day, Hour, Minute, and so on.

The following function retrieves the year from a ...

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