Report Data Source specifying field names

rahul_jnk
Member Posts: 61
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?
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?
0
Best Answer
-
Sorry my answer was not clear ...
What I mean ...
You can write such Code like above or use "Sales Line" as DataItem and use the fields like
"No." or "Sales Line"."No.".
If you are in your "Sales Line" DataItem it's "like" a WITH
With kind regards
mik6
Answers
-
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
mik0 -
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.0 -
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 Veenendaal0
-
Sorry my answer was not clear ...
What I mean ...
You can write such Code like above or use "Sales Line" as DataItem and use the fields like
"No." or "Sales Line"."No.".
If you are in your "Sales Line" DataItem it's "like" a WITH
With kind regards
mik6 -
Thanks for the replies everyone.
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions