grouping and totaling variables in a report

blhblh 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

Comments

  • garakgarak Member Posts: 3,263
    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 integer
    Do you make it right, it works too!
  • blhblh Member Posts: 24
    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.
    blh
Sign In or Register to comment.