grouping and totaling variables in a report

blh
Member Posts: 24
I am trying to do a modified version of the Inventory Valuation report (10139). In a new report I set up the data items just like report 10139. I took the function AdjustItemLedgEntryToAsOfDate and put it in the new report to calculate the Remaining Quantity and Cost Amount (Actual). In the Item Ledger Entry OnAfterGetRecord I have the following code:
AdjustItemLedgEntryToAsOfDate("Item Ledger Entry");
RemainingCwts := "Remaining Quantity" * Item."Net Weight" / 100;
RemainingQty := "Remaining Quantity";
InventoryValue := "Cost Amount (Actual)";
What I want to do is group by location so that the RemainingQty, RemainingCwts and InventoryValuation variables are grouped by warehouse location from the Item Ledger Entry table. I’ve tried dropping the variables into a GroupFooter for the ItemLedgerEntry but this doesn’t work. I’ve also tried putting TOTALSCAUSEDBY and SHOWOUTPUT code in various triggers with no success. When I put the three variables into the footer section of the Item data item I get the totals for the entire company which I also need but I can’t get it to group by warehouse location from the Item Ledger Entry table. Any help with this would be greatly appreciated! If there is a report out there that gives a good example of grouping and totaling variables also let me know. I read one post which suggested looking at report 1208 for help with TOTALSCAUSEDBY but our database doesn’t contain that report.
blh
AdjustItemLedgEntryToAsOfDate("Item Ledger Entry");
RemainingCwts := "Remaining Quantity" * Item."Net Weight" / 100;
RemainingQty := "Remaining Quantity";
InventoryValue := "Cost Amount (Actual)";
What I want to do is group by location so that the RemainingQty, RemainingCwts and InventoryValuation variables are grouped by warehouse location from the Item Ledger Entry table. I’ve tried dropping the variables into a GroupFooter for the ItemLedgerEntry but this doesn’t work. I’ve also tried putting TOTALSCAUSEDBY and SHOWOUTPUT code in various triggers with no success. When I put the three variables into the footer section of the Item data item I get the totals for the entire company which I also need but I can’t get it to group by warehouse location from the Item Ledger Entry table. Any help with this would be greatly appreciated! If there is a report out there that gives a good example of grouping and totaling variables also let me know. I read one post which suggested looking at report 1208 for help with TOTALSCAUSEDBY but our database doesn’t contain that report.
blh
0
Comments
-
You can, for example, store the datas in a temptable and goup in the temptable per code (sorting).
The temptable you print with using the DataItem integerDo you make it right, it works too!0 -
Garak,
Thanks for the reply. I had thought about something like that but was kind of worried about using a temp table that would contain so many records. The item ledger entry table for one of our larger companies has about 300,000 records and is growing. If this isn't something to worry about then I can give it a try. I'm just a little new at all this and didn't know how to proceed. Is there a report out there that you know of that uses a temp table in the manner you described? Thanks again.
blh0
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