visual-web-developer-2010dynamics-nav

Opening RDLC Layout in Visual Studio shows <<expr>> instead of value


When I open a report from Dynamics NAV 2013 in Visual Web Developer 2010, every text box shows a field that looks like

<<Expr>>

Where << and >> are the french Guillemet characters. I find this rather difficult because I have to analyze the properties of each text box, if I am looking for a particular field.

For example in this picture, how do I know which field is the Customer Name, Phone Number or VAT Registration No?

Is there any way to configure Visual Web Developer to expand the Expression like it was in Visual Studio 2008 with NAV 6.0?

Preferably I would like to either see a label instead of the generic Expr or just the old Fields!Some_random_field.Value like it was in Visual Studio 2008.

enter image description here


Solution

  • Ah, another feature of NAV & RDLC :)

    You'll find that the Expr text appears when an expression reaches a certain "complexity" -- e.g. from just a field;

    =Fields!TotalText.Value
    

    to

    =(Fields!TotalText.Value)
    

    The fields in the header are usually always Expr as the values are passed using GetData and SetData (and remain that way from NAV 2009 reports). While this limitation was somewhat removed in NAV 2013, you can only put static values in the header -- they won't change across pages which is useless for multiple SO's or Customers for example.

    There isn't a way to show it in the properties box, however the quickest way seems to be to select the field, Right Click, "Expression".

    I'd suggest giving the textbox a name other than TextBox to make it easier to identify fields (e.g. "SalesHeaderNo");

    Identifying Expr using Name