Backdated inventory?
navfresher
Member Posts: 44
How to get the backdated inventory of a particular item?I need to print them in a report
From which table i can get it?
From which table i can get it?
0
Comments
-
Add a Date Filter in the "Item Ledger Entry" table and add the Quantity field for all records.
Or create a FlowField on the Item table to get you the value.
Salut!Laura Nicolàs
Author of the book Implementing Dynamics NAV 2013
Cursos Dynamics NAV (spanish) : http://clipdynamics.com/ - A new lesson released every day.0 -
Date Filter + the Net Change field in Item.0
-
Thanks Miklos, I didn't see the Net Change field on the table.
Salut!Laura Nicolàs
Author of the book Implementing Dynamics NAV 2013
Cursos Dynamics NAV (spanish) : http://clipdynamics.com/ - A new lesson released every day.0 -
-
I ment that I didn't see the field *before* Miklos post.
Sorry for the misunderstanding, my english knowledge makes me write this :-p
Thanks anyway,
Salut!Laura Nicolàs
Author of the book Implementing Dynamics NAV 2013
Cursos Dynamics NAV (spanish) : http://clipdynamics.com/ - A new lesson released every day.0 -
Miklos Hollender wrote:Date Filter + the Net Change field in Item.
Thank you...but a request from my side :
can you just explain me what does that "Net change" filed mean?
and also can you explain me the logic behind the solution you gave and how it works?0 -
"Inventory" and "Net change" are both flowfields in the item table which have similar calcformulas, the only difference is that "Net change" take take a date filter into account. So "Inventory" can only be used to show the stock qty as of today, whereras "Net change" can show you same for any day in the past. Just set a date filter (this is a flowfilter field) like "..31.12.08" ( if your date format is DDMMYY, otherwise of course use your local date formatnavfresher wrote:can you just explain me what does that "Net change" filed mean?
) to see the inventory at the end of 2008.
You will find a "Net change" field in other master tables too (G/L account etc.)Kai Kowalewski0 -
Kowa wrote:
"Inventory" and "Net change" are both flowfields in the item table which have similar calcformulas, the only difference is that "Net change" take take a date filter into account. So "Inventory" can only be used to show the stock qty as of today, whereras "Net change" can show you same for any day in the past. Just set a date filter (this is a flowfilter field) like "..31.12.08" ( if your date format is DDMMYY, otherwise of course use your local date formatnavfresher wrote:can you just explain me what does that "Net change" filed mean?
) to see the inventory at the end of 2008.
You will find a "Net change" field in other master tables too (G/L account etc.)
My heartful thanks for your time,but my real concern is this :
I am making a report where i need to print today's inventory as well as 1 week's past inventory.i can fetch todays date from the request field and i am storing week before date by substracting 7days from the today's date.But,While using some filter i am not able to use that variable which i used to store 7days before date.
Any solution for me?0 -
Create an second item record variable (Item2), apply the date filter for the last week to that, use GET with the item no. to fetch the same item and do CALCFIELDS for the "Net change" field with this record and use Item2."Net change" as the source expression in the control for last weeks inventory.
Item2.get(Item."No."); Item2.setfilter("Date Filter",'..%1',Calcdate('<-7D>')); Item2.calcfields("Net Change");Kai Kowalewski0 -
Hi
Why are you not using the standard report Inventory valuation and set the proper filters?Boris
*
Please, do not frighten the ostrich,
the floor is concrete.0 -
If you need both values side by side in one report you need to do some coding. Of course you can use the report and regard last weeks inventory as the starting date, but if you want to create own reports and learn some C/AL techniques that won't help you.bstoyano wrote:Hi
Why are you not using the standard report Inventory valuation and set the proper filters?Kai Kowalewski0 -
Kowa wrote:Create an second item record variable (Item2), apply the date filter for the last week to that, use GET with the item no. to fetch the same item and do CALCFIELDS for the "Net change" field with this record and use Item2."Net change" as the source expression in the control for last weeks inventory.
Item2.get(Item."No."); Item2.setfilter("Date Filter",'..%1',Calcdate('<-7D>')); Item2.calcfields("Net Change");
Hi Kowa,
This code is still printing the inventory on the date filter which i have set and not week's before inventory.What could be the reason?0 -
I am just a consultant, not a developer. My advice is from a user's point of view.Kowa wrote:
If you need both values side by side in one report you need to do some coding. Of course you can use the report and regard last weeks inventory as the starting date, but if you want to create own reports and learn some C/AL techniques that won't help you.bstoyano wrote:Hi
Why are you not using the standard report Inventory valuation and set the proper filters?Boris
*
Please, do not frighten the ostrich,
the floor is concrete.0 -
That code and the modified source expression is really all you need. I have created a simple report so you can see for yourself that it works.navfresher wrote:
Hi Kowa,
This code is still printing the inventory on the date filter which i have set and not week's before inventory.What could be the reason?OBJECT Report 50066 Inventory Comparison { OBJECT-PROPERTIES { Date=24.01.10; Time=13:43:35; Modified=Yes; Version List=; } PROPERTIES { } DATAITEMS { { PROPERTIES { DataItemTable=Table27; DataItemTableView=SORTING(No.); OnAfterGetRecord=BEGIN Item2.GET(Item."No."); Item2.SETFILTER("Date Filter",'..%1',CALCDATE('<-7D>')); Item2.CALCFIELDS("Net Change"); END; TotalFields=Net Change,Inventory; } SECTIONS { { PROPERTIES { SectionType=Header; PrintOnEveryPage=Yes; SectionWidth=18150; SectionHeight=1692; } CONTROLS { { 1119300001;Label ;0 ;0 ;7500 ;423 ;FontSize=8; FontBold=Yes; CaptionML=[DEU=Artikel; ENU=Item] } { 1119300002;TextBox;15000;0 ;3150 ;423 ;HorzAlign=Right; SourceExpr=FORMAT(TODAY,0,4) } { 1119300003;TextBox;0 ;423 ;7500 ;423 ;SourceExpr=COMPANYNAME } { 1119300004;TextBox;17700;423 ;450 ;423 ;CaptionML=DEU=Seite; SourceExpr=CurrReport.PAGENO } { 1119300005;Label ;16950;423 ;750 ;423 ;ParentControl=1119300004 } { 1119300006;TextBox;15900;846 ;2250 ;423 ;HorzAlign=Right; SourceExpr=USERID } } } { PROPERTIES { SectionType=Header; PrintOnEveryPage=Yes; SectionWidth=18150; SectionHeight=1269; } CONTROLS { { 1119300009;Label ;0 ;0 ;1500 ;846 ;ParentControl=1119300008; VertAlign=Bottom; FontBold=Yes; MultiLine=Yes } { 1119300012;Label ;1650 ;0 ;4500 ;846 ;ParentControl=1119300011; VertAlign=Bottom; FontBold=Yes; MultiLine=Yes } { 1119300015;Label ;6300 ;0 ;1800 ;846 ;ParentControl=1119300014; VertAlign=Bottom; FontBold=Yes; MultiLine=Yes } { 1119300018;Label ;8250 ;0 ;1800 ;846 ;ParentControl=1119300017; VertAlign=Bottom; FontBold=Yes; MultiLine=Yes } } } { PROPERTIES { SectionType=Body; SectionWidth=18150; SectionHeight=423; } CONTROLS { { 1119300008;TextBox;0 ;0 ;1500 ;423 ;HorzAlign=Left; SourceExpr="No." } { 1119300011;TextBox;1650 ;0 ;4500 ;423 ;HorzAlign=Left; SourceExpr=Description } { 1119300014;TextBox;6300 ;0 ;1800 ;423 ;HorzAlign=Right; SourceExpr=Inventory } { 1119300017;TextBox;8250 ;0 ;1800 ;423 ;HorzAlign=Right; CaptionML=[DEU=Lagerbestand Vorwoche; ENU=Last weeks Inventory]; DecimalPlaces=0:5; SourceExpr=Item2."Net Change" } } } } } } REQUESTFORM { PROPERTIES { Width=9020; Height=3410; } CONTROLS { } } CODE { VAR Item2@1119300000 : Record 27; BEGIN END. } }Kai Kowalewski0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 328 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

