다음을 통해 공유


Check mark in Microsoft Dynamics NAV Reports

Recently, one of the partners asked me if it is possible to display Boolean fields as check marks in NAV reports. I tried it out and it is pretty simple.

I created a new and simple report on Item table with the following dataset:

Untitled1

 

In the layout design, I used a table control to display the data in the body section and I used a text box control to show the title of the report in the header:

untitled2

Note: To learn how to use a table control see the video: How to: Build a simple list report in Microsoft Dynamics NAV 2013 

I saved the report and ran it. In the report preview, boolean field values were shown as True/False instead of check mark!

Untitled3

To show the Boolean field as Check mark, I went back to the layout designer and did the following changes:

1. Opened the text box properties for the Boolean field (CostIsAdjusted) and inserted an expression for the value field as shown below:

I changed “ =Fields!CostIsAdjusted_Item.Value” to =IIF(Fields!CostIsAdjusted_Item.Value,Chr(254),Chr(168))

Untitled4

2. Changed the font to Wingdings for the Boolean field only:

Untitled5

After these 2 changes, I saved the report and ran it. The preview now displays check marks for Boolean field values:

Untitled6

:)

More about Microsoft Dynamics NAV reports here

Comments

  • Anonymous
    June 07, 2014
    The comment has been removed
  • Anonymous
    September 29, 2016
    How can I find other characters value like Chr(254) represents tick or cross, Can i See list some where
  • Anonymous
    January 07, 2017
    Nice one :),