How to use CALCFIELDS

James111
Member Posts: 63
Hi,
I have problem, because i would like get FlowField(Cost Amount (Expected)) from table : Item Ledger Entry to my report.
My code:
Variables: Cost - decimal.
CALCFIELDS(Cost Amount (Expected));
Cost:=Cost Amount (Expected);
But it doesn't work,
Plese give me answer.
Thanks,
James
I have problem, because i would like get FlowField(Cost Amount (Expected)) from table : Item Ledger Entry to my report.
My code:
Variables: Cost - decimal.
CALCFIELDS(Cost Amount (Expected));
Cost:=Cost Amount (Expected);
But it doesn't work,
Plese give me answer.
Thanks,
James
0
Comments
-
is item ledger entry the dataitem of your report?
http://msdn.microsoft.com/en-us/library/dd338975.aspx
ex/
[Ok :=] Record.CALCFIELDS(Field1, [Field2],...)
ILE.CALCFIELDS("Adjusted Cost (Expected)");
Are you just getting a zero or are you getting an error?
make sure you test it on a entry that actually has a value.0 -
DataItem is "Item Ledger Entry" and Value is 0,00.
I don't know where is the problem.
James0 -
Hi, put a breakpoint there and run it through the debugger. I bet you'll find your solution pretty quickly. BTW, I am assuming you are using Classic. Good luck!0
-
Are you putting your code OnAfterGetRecord trigger of the ILE dataitem?
Can we assume this "cost" variable is the Sourcexp of a textbox that exists in the body of the report?
Are you testing the report with a ILE that actually has a value. Note that field doesn't always contain a value.
Perhaps you'r looking to do more of a.....ILE.Calcfields("Adjusted Cost", "Adjusted Cost (Expected)"); If ILE."Adjusted Cost" = 0 then cost := ILE."Adjusted Cost (Expected)" else cost := ILE."Adjusted Cost";
Unless you're just trying to find the ILE that are not zero.0 -
Yes, I putted trigger OnAfterGetRecord,
I used variable: Cost in a report.
I will try..
Thanks0 -
did you try the above code? or is this report specifically looking the "expected" field?0
-
No, i didn't try yours code, mayby it work.
James0 -
are you also filtering on Item No.?
Find an item that you are sure has a value in that field and test it.0 -
It's working, Cost Amount (Expected) it's realy 0,00:) - this is wrong field.
Correct field is ;Cost Amount (Actual)
Thanks for your helps.
James:)0 -
Sometimes it's the little things. 8)
ILE can grow really large I like to throw a SETCURRENTKEY line in to help speed it up.
ex/
SETCURRENTKEY("Item No.","Variant Code","Drop Shipment","Location Code","Bin Code","Posting Date");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