Calculate 2fields from 2tables

kraly
Member Posts: 14
I have 2 tables where I need to get the field value then make a calculation of it and print it as a variable in report.
How can I do it? Sorry that I'm new. I don't even know the method I should create to be place in the report > Method or Report> Design>Method.
As I see the example, the coding is too long. I still puzzle of the usage of this term: init, fetch and run. How do I utilize this method? and what is a query for? How come some query is in the fetch() method.
During school time, I've learned init fetch and run is how the applet life cycle. But I just don't get how it work here.
I even go through the chm file, I have come across the display method, but how do I use it if I want to pass two fields from two tables. Errors keep prompt up saying syntax errors.
I really need help. Thanks in advance.
How can I do it? Sorry that I'm new. I don't even know the method I should create to be place in the report > Method or Report> Design>Method.
As I see the example, the coding is too long. I still puzzle of the usage of this term: init, fetch and run. How do I utilize this method? and what is a query for? How come some query is in the fetch() method.
During school time, I've learned init fetch and run is how the applet life cycle. But I just don't get how it work here.
I even go through the chm file, I have come across the display method, but how do I use it if I want to pass two fields from two tables. Errors keep prompt up saying syntax errors.
I really need help. Thanks in advance.
Noob in everything especially in Axapta.
Moving towards, start to understand about Axapta.
Live with Axapta and nothing else for my life atm..
Moving towards, start to understand about Axapta.
Live with Axapta and nothing else for my life atm..
0
Comments
-
Maybe you could come up with the details about the fields and the tables. It would be a help.Best regards
Lars0 -
Display methods don't take arguments, so you need to create them where both variables you need to calculate on are accesible.
For example, if you were showing the LineAmount of a SalesOrder Line, you could create a display Method on the SalesLine table and post code like this there:display LineAmount lineAmountMy() { return this.PurchQty * this.PurchPrice; //discounts are not inclduded in this example }
So you see, using 2 variables we calculated the lineAmount. And we can put this method on a control in report.
If you provide more info on your specific task, maybe we will be able to help you moreVanya Kashperuk,
My blog - http://kashperuk.blogspot.com
MorphX IT in Russian - http://www.lulu.com/content/723888
Inside Dynamics AX 4.0 in Russian - http://www.ozon.ru/context/detail/id/37145820 -
thanks a lot for the help.
i get the idea already. :PNoob in everything especially in Axapta.
Moving towards, start to understand about Axapta.
Live with Axapta and nothing else for my life atm..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