Item <-> Item Ledger Entry
valkatamake
Member Posts: 38
Hi I want to do report which shows me in specified period of time what item hasn't been sold but it is in inventory ...
but they don't respond with each other
Item - OnPreDataItem()
itemledger.RESET;
SETFILTER(Inventory,'>0');
date1:=CALCDATE(refdate,TODAY);
itemledger.SETRANGE("Posting Date",date1,TODAY);
Item - OnAfterGetRecord()
IF itemledger."Entry Type" = itemledger."Entry Type"::Sale THEN CurrReport.SKIP ;
but they don't respond with each other
0
Comments
-
Item - OnPreDataItem() itemledger.RESET; SETFILTER(Inventory,'>0'); date1:=CALCDATE(refdate,TODAY); itemledger.SETRANGE("Posting Date",date1,TODAY); Item - OnAfterGetRecord() itemledger.SETRANGE("Item No.",Item."No."); // here it is linked now itemledger.SETRANGE("Entry type",itemLedger."entry Type"::sale); if ItemLedger.findset then CurrReport.SKIP;Sandeep Prajapati
Technical Consultant, MS Dynamics NAV0 -
2 setranges ? :shock:0
-
valkatamake wrote:2 setranges ? :shock:
first one is for linking and
2nd one to filter all Item Ledger Entries of type : Sale
if there is any sale entry type the report skips the iteration for the item
This is what you wanted...?? Isn't it..??
Sandeep Prajapati
Technical Consultant, MS Dynamics NAV0 -
Item - OnPreDataItem() SETFILTER(Inventory,'>0'); date1:=CALCDATE(refdate,TODAY); Item - OnAfterGetRecord() itemledger.RESET; itemledger.SETRANGE("Posting Date",date1,TODAY); itemledger.SETRANGE("Item No.",Item."No."); // here it is linked now itemledger.SETRANGE("Entry type",itemLedger."entry Type"::sale); if ItemLedger.findset then CurrReport.SKIP;
Try this, as in the previous one ItemLedger Record will not get reset for the iterations of Item DataItemSandeep Prajapati
Technical Consultant, MS Dynamics NAV0 -
You should be able to get what you want from existing reports I think, if not then with a few tweaks here and there.
Inventory - Sales Statistics for example, you can run this with Include Items Not Sold ticked, and add a filter for Inventory > 00 -
Yes but I have to do it myself i'm applying for job and have to know these things before i get started0
Categories
- All Categories
- 75 General
- 75 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
- 610 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions