Calculate total programatically

foxclub
Member Posts: 16
Hello. Please I need to calculate the total of quantity in report "transfer shipment" by c/al code.
Give me an idea.
I am using dynamics nav 2018 v11.
Give me an idea.
I am using dynamics nav 2018 v11.
0
Answers
-
And thats totally depends on the grouping of your Report like how you have maintained it.Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/0 -
Hello,
=sum(Fields!Qty_TransShptLine.Value)
This is how i calculated the total quantity in "transfer shipment" report.
Unfortunately sum obtained was wrong.0 -
when you see the Report preview, go to About this report and export the data in excel and check where is the correct value is coming & use last instead of sum if correct value is in the last row or if the correct value is the first value then use the first instead sum.
if the value is coming somewhere in between, then you have to write code on the onaftergetrecord of the record and have to use that variable's sum or last in the rdlc expression.0 -
using last or first instead of sum did not work. Then how please could I use that by code.
I tried in OnAfterGetRecord():
totQty:="Transfer Shipment Line".Quantity;
However no result.0 -
using last or first instead of sum did not work. Then how please could I use that by code.
I tried in OnAfterGetRecord():
totQty:="Transfer Shipment Line".Quantity;
However no result.
In case of you want to use a variable to accumulate the values please try this codetotQty += "Transfer Shipment Line".Quantity;
Never forget to clear your variable every time the grouping key is changed.0
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