Total on a Decimal Field
                
                    Mclaren                
                
                    Member Posts: 47                
            
                        
            
                    Hi Guys,
I am confused on How to get the Total for a Decimal Variable in the Report. For Example I have created a Decimal Variable call DecimalVariable.
DecimalVariable := A + B ;
How to get the Total of that DecimalVariable from the Report? Plz help on this.
Thanks in advance.
                I am confused on How to get the Total for a Decimal Variable in the Report. For Example I have created a Decimal Variable call DecimalVariable.
DecimalVariable := A + B ;
How to get the Total of that DecimalVariable from the Report? Plz help on this.
Thanks in advance.
0                
            Comments
- 
            Put your variable (DecimalVariable) in the body or header section of the report. So, whaterever value is stored in the field will be refelected in the report.0
 - 
            Hi nverma. Thanx for ur reply. I just need the total of that Decimal Variable. Not the Decimal Value. Thats what I am asking for.0
 - 
            The total is stored in the variable itself (DecimalVariable).0
 - 
            Yes u r Correct. If we tell like this.
1st A+B = 20
2nd A+B = 35
3rd A+B = 40
4th A+B = 72
5th A+B = 50
Here I have 5 records.
So I have print that Total as 20 + 35 + 40 + 72 + 50 = 217. This is what I am asking. HOw to get the Total?0 - 
            Try something like this:
Sum (text)
Make a field called: Total (decimal):= 1st+2nd+3rd+4th +5th;
or
Sum := "%1 + %2 + %3 + %4 +%5 = %6", 1st, 2nd, 3rd, 4th, 5th, Total ;
I havent tested it, but it should be something around those lines.0 - 
            Hi,
create a global variable (in this case DecVar) of type decimal. In the appropriate DataItem, place code in the OnAfterGetRecord section like:
DecVar:= 0;
DecVar := DecVar + SalesInvLine.Amount;
Then use DecVar as your SourceExpr in the textbox. You probably don't want to add processing type code in the sections area of your report. Run your report through the debugger so you can get an idea of how the calculations work for you. Good luck with this.0 - 
            Thank You Guys for Your Reply on this. I got some idea on it and trying to work it out. Thank You for Your Kind Help.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
 - 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