create a total in a Dataport

marcolde
Member Posts: 12
Hi,
i would create a dataport to export some lines of the payment journal.
the lines are not the problem, but at the end i have a integer and there i need a total of diffrent columns like amount, debitamount and creditamounts.
How can i create this total lines? I have try it but i only a got a export of every seperated line.
thanks for helping
Marco
i would create a dataport to export some lines of the payment journal.
the lines are not the problem, but at the end i have a integer and there i need a total of diffrent columns like amount, debitamount and creditamounts.
How can i create this total lines? I have try it but i only a got a export of every seperated line.
thanks for helping
Marco
0
Answers
-
Hi,
declare 3 variable of type Decimal TotalAmount, DebitAmount, CreditAmount
on the Payment Journal Line DataItem in the OnBeforeExport add the following codeTotalAmount := TotalAmount + Amount; IF Amount > 0 THEN DebitAmount := DebitAmount + Amount ELSE CreditAmount := CreditAmount + Amount;
You will have to add a new DataItem using the Integer table with value 1 only
set the above variables as the Dataport Fields
Hope this helps0 -
Hi,
this works absolut perfect, but now i have another problem. I need to show the number without comma.
So it creates a total with 3,00 but i need 000000300. I try it with format and a new variable TotalAmount1 but i do not know how i can delete the comma and see only the numbers.
any help again?
thank you very much
MarcoTotalAmount1 := FORMAT(TotalAmount,0,'<Integer,8><Filler Character,0><Decimal,3><Precision,0:2>');
0 -
Thanks for your help
i found the solution and it does works.TotalAmount1 := DELCHR(TotalAmount1,'=',',');
i create a new variable and than i delete the commy.
thanks
Marco0
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
- 322 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