Difference Between FIELDCAPTION and Include Caption

In RDL reporting in NAV 2017 what's the difference in using FIELDCaption(MyTable.MyField) instead of Include Caption = TRUE in the Report Dataset Designer.

When should I use which one in which context, what's the be practice on this ?

I see that sometimes on some reports IncludeCaption is ticked to TRUE and sometimes fieldcaption is used, what's the design decision pattern on this ?

  • Hi Horia,
    Welcome to the Dynamics User Group.

    First of all then the "Include Caption" option only works on fields which are part of the current dataset table. If your dataset table where Sales Header, then you would not be able to i.e. have a field showing payment terms description to show that caption with the include option.

    Most often you will end up with some fields, where you are able to use "include caption", and some fields where you cannot. Then when you go to Visual Studio to design your report, then you need to remember which captions are defined as fields and which must be used via labels.

    So while it may be easier, just to use the "include captions", then for the sake of a cleaner design, I personally avoid using them.

    With one exception. If the report you are creating is going to be very large with a lot of dataset rows, then using "include captions" may improve performance or at least make your XML file much smaller. Compared to having the captions, side by side with the fields and FieldCaption(Field), then "include captions" are only in the file once.
  • FieldCaption is normally used everywhere in NAV to print the Caption of the Field, where as Include Caption is just used in Reports which actually comes in as Parameters in Reports and can be directly used.