Cycle Count Report based on 1st business day of Month
gadzilla1
Member Posts: 316
Hello,
I have a report request to display items (from the item table) to be counted during the 1st 20 business days of every month. This is somewhat difficult to explain but I'll do my best.
Each of our items has a category: A1 through A20, B1 through B40 and C1 through C60. I've put this data in a table with Item No. (table related) and the Item Category.
On the first business day of the first month, items with A1, B1, and C1 should be printed in the report to be counted (the second business day A2, B2, C2 print, and so on until the 20th business day when A20, B20, C20 print).
Here's where it gets tricky: On the first business day of the second month, items with A1, B21, and C21 should be printed in the report to be counted (the second business day A2, B22, C22 print, and so on until the 20th business day when A20, B40, C40 print).
On the first business day of the third month, items with A1, B1, and C41 should be printed in the report to be counted (the second business day A2, B2, C42 print, and so on until the 20th business day when A20, B20, C60 print).
I've developed a report that works, but I have to enter too much date information on the request form...can anyone think of a formula, or any additional table, or date field that could further automate this report? It's a tough one, I know, and difficult to explain. I guess an option would be to enter in the date to print in a field in the table described, but that seems like too much maintenance. Thanks for any ideas!
I have a report request to display items (from the item table) to be counted during the 1st 20 business days of every month. This is somewhat difficult to explain but I'll do my best.
Each of our items has a category: A1 through A20, B1 through B40 and C1 through C60. I've put this data in a table with Item No. (table related) and the Item Category.
On the first business day of the first month, items with A1, B1, and C1 should be printed in the report to be counted (the second business day A2, B2, C2 print, and so on until the 20th business day when A20, B20, C20 print).
Here's where it gets tricky: On the first business day of the second month, items with A1, B21, and C21 should be printed in the report to be counted (the second business day A2, B22, C22 print, and so on until the 20th business day when A20, B40, C40 print).
On the first business day of the third month, items with A1, B1, and C41 should be printed in the report to be counted (the second business day A2, B2, C42 print, and so on until the 20th business day when A20, B20, C60 print).
I've developed a report that works, but I have to enter too much date information on the request form...can anyone think of a formula, or any additional table, or date field that could further automate this report? It's a tough one, I know, and difficult to explain. I guess an option would be to enter in the date to print in a field in the table described, but that seems like too much maintenance. Thanks for any ideas!
0
Comments
-
I did not test it but may it work OK:
Parameters:
p_intDay --> Integer
p_intMonth --> Integer
p_codItemType --> Code 1
Return:
Text 3intRule := 0; CASE p_codItemType OF A: BEGIN intRule := 1; END; B: BEGIN IF p_intMonth=1 THEN intRule := 1 ELSE intRule := 2; END; C: BEGIN IF p_intMonth=3 THEN intRule := 2 ELSE intRule := 1; END; END; IF intRule=0 THEN ERROR('Invalid Rule') ELSE BEGIN CASE intRule OF 1: EXIT(p_codItemType + FORMAT(p_intDay)); 2: EXIT(p_codItemType + FORMAT(20*(p_intMonth-1) + p_intDay); END; END;
If you need I'll save an Excel about how I get it:
Sergi Navarro
MCTS: Microsoft Dynamics™ NAV 2009 C/SIDE Solution Development
Visit my Navision Spanish Blog here: http://www.sergisoft.com0 -
Hi,
Thank you very much, I'll try this now and report back.
Have a nice day. Chris0
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
- 333 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