calcsums in sql 2005
                
                    117320                
                
                    Member Posts: 33                
            
                        
            
                    Hi, all
Can someone help me,i am using sql 2005 and nav 4.0 sp3,my coding like this :
lvAccountHeader.reset;
IF lvAccountHeader.FINDSET THEN BEGIN
lvAccountHeader.CALCSUMS("Total Paid");
lvTotalPaid := lvAccountHeader."Total Paid";
END;
lvTotalPaid return 0
when i see to the table Total Paid got value.in the key i already put Total paid as sumindexfield in the primary key.
why is this happen?is there any setup that i must do first?
                Can someone help me,i am using sql 2005 and nav 4.0 sp3,my coding like this :
lvAccountHeader.reset;
IF lvAccountHeader.FINDSET THEN BEGIN
lvAccountHeader.CALCSUMS("Total Paid");
lvTotalPaid := lvAccountHeader."Total Paid";
END;
lvTotalPaid return 0
when i see to the table Total Paid got value.in the key i already put Total paid as sumindexfield in the primary key.
why is this happen?is there any setup that i must do first?
0                
            Comments
- 
            That field is probably a flowfield, not a sumindexfield. Try CALCFIELDS("Total Paid") instead. Remove that field as a sumindexfield.
By the way, you don't need to do IF FINDSET when you do a CALCSUM, that is not necessary.0 - 
            Total Paid field is a normal field,is not a flowfield. total paid is declare as a sumindexfield for primary key.0
 - 
            remove findset as Daniel mentioned. Also make sure you have actual any record in the table and that you are referencing the correct table.0
 - 
            Maybe they all add up to 0, or else you're not sharing other filters that you've set. If you truly defined the field as a sumindexfield, and you are doing a CALCSUM, and there are values in that field, it should add up properly.0
 - 
            Thanks All,i can use calcsums,i remove findset then the result come up.0
 
Categories
- All Categories
 - 73 General
 - 73 Announcements
 - 66.7K 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
 - 323 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
 

