Report Data Source specifying field names

This might be a very basic one but I'm not getting the difference when you specify field names with Record prefixes and without prefixes under a data item.
For example I select Data Item as Customer and in the next line I select Column and add Customer."No" instead of just "No" in Data Source Column. Why specifying this way have different effects?

Best Answer

Answers

  • mikmik Member Posts: 79
    The should not have a different effect.

    The difference is just that you are in the context of the upper DataItem. So there are know field names.
    You can also write Code like ..
    WITH Customer DO BEGIN
      INIT;
      "No." := 'some value';
      Customer.Name := 'some other value';
      Customer.INSERT;
    END;
    

    With kind regards
    mik
  • rahul_jnkrahul_jnk Member Posts: 61
    Hi mik ,
    Sorry if I wasn't clear, I was talking about Report Dataset Designer not C/AL .
    If we mix the two formats, I guess its taking as different variables or something.
  • Jan_VeenendaalJan_Veenendaal Member Posts: 206
    No, no difference at all. If you omit the dataitem name, the compiler will use 'implied with' to find the context - which will be the same context ('Customer' in your example) as when you do not omit the dataitem name.
    Jan Veenendaal
  • rahul_jnkrahul_jnk Member Posts: 61
    Thanks for the replies everyone.



Sign In or Register to comment.