Total quantity on excel export

martinher562martinher562 Member Posts: 50
Hello NAV Experts,

I am having a hard time coming up with the right C/AL syntax to get what I need.

This report that needs to be broken down by location then item and then lot. This report base table is Item Ledger Entry.
The report needs to have a total for the sum of remaining quantity after it has displayed all of the lots for a corresponding item.

I already have the report done in the visual basic, but I cannot get it in the excel export.

I tried adding a decimal variable called "" and then on the Item Ledger Entry - OnAfterGetRecord trigger add the following code:

TotalByItems := CALCFIELDS("Item Ledger Entry"."Remaining Quantity")

I also tried: TotalByItems := "Item Ledger Entry".CALCFIELDS("Remaining Quantity")

However, nothing works !!!!

I have gotten the report get like the attached picture. This picture also shows how I need the report to look like.
I also attached a screenshot of my code.

I already tried following this: https://saurav-nav.blogspot.com/2015/06/nav-2013-later-grouping-in-export-to.html
However, it does not make sense as this tutorial does not mention if it using functions, variables or what he named them. Very confusing for a beginner.

Again thank you for everything in advance.

Best Answer

Answers

  • martinher562martinher562 Member Posts: 50
    Thank you @Sowkarthika !!! I spent a full day trying to figure this out. I appreciate the help. If you are ever in Los Angeles, CA. Let me know. we will go out to eat.
Sign In or Register to comment.