CALCFIELDS Function

jmlozares
Member Posts: 110
I have a report that shows fields as "Qty. Sold Not Posted", since this field is a FlowField I have first to call the CALCFIELDS function in order to update its value.
I can't figure out the problem 'cause it seems such function doesn't work. All records displayed the value "0" instead of showing the actual value. What could be the problem with this??
Best Regards..
I can't figure out the problem 'cause it seems such function doesn't work. All records displayed the value "0" instead of showing the actual value. What could be the problem with this??
Best Regards..
Janderol Lozares Jr.
Manila, Phils.
Manila, Phils.
0
Comments
-
Hi Jmlozares,
You are using the write function which is calcfields .Just check is there any filter on the report.If thats not the case then send the structure of ur report and where r u putting ur code .
Cheers,
Tarun0 -
With regards to filtering everything is okay.. I've placed the code inside the "OnAfterGetRecord" trigger.Janderol Lozares Jr.
Manila, Phils.0 -
Do ya mind putting ur code as it is quite hard to guess whats wrong in it .Or mail me the object .
Cheers,
Tarun0 -
to ellaborate further, I'm using the "Item" table as one of my dataitem on the report. What I want to achieve is to get the actual inventory. So what I've done is this one:
Item.CALCFIELDS(Inventory,"Qty. Sold Not Posted","Sales (Qty.)"); vQtyOnHand := Item.Inventory - Item."Qty. Sold Not Posted";
Janderol Lozares Jr.
Manila, Phils.0 -
Difficult to get an idea like this.
Are you sure you put the code in the "OnAfterGetRecord()"-trigger of the dataitem "Item"?
You might put a message just after the "Item.CALCFIELDS(...".
MESSAGE('No=%1\Inventory=%2\filter=%2',Item."No.",Item.Inventory,Item.GETFILTERS);
with this we see the no and inventory of the item and also which filters there are on the item.
PS just select a few items to run this.[/quote]Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!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