referring to the row above
asembereng
Member Posts: 220
Hi everyone, i am novice to Navision. I am working on a report that needs to compare two different rows within the same same table. I want it to compare the amount where document type is finance charge memo and where the next row document type is payment being compared to the amount the payment is being applied and if the payment is less than the finance charge it should take the payment as finance charge. can someone Please help me out.
Thanks
IF "Document Type"="Document Type":: "Finance Charge Memo" THEN BEGIN
Fincharge :="Remaining Amount";
END;
IF "Document Type"="Document Type"::Payment THEN BEGIN
Principal:= "Closed by Amount";
// ***************************************************************8
IF Amount < Fincharge THEN
Fincharge := Amount;
IF Principal=0 THEN
Fincharge :=-ABS(Amount)
ELSE
// ***************************************************************8
Fincharge :=ABS(Amount)-ABS(Principal);
Thanks
IF "Document Type"="Document Type":: "Finance Charge Memo" THEN BEGIN
Fincharge :="Remaining Amount";
END;
IF "Document Type"="Document Type"::Payment THEN BEGIN
Principal:= "Closed by Amount";
// ***************************************************************8
IF Amount < Fincharge THEN
Fincharge := Amount;
IF Principal=0 THEN
Fincharge :=-ABS(Amount)
ELSE
// ***************************************************************8
Fincharge :=ABS(Amount)-ABS(Principal);
0
Comments
-
Create an extra global variable on your table. In the OnAfterGetRecord-trigger, save the record of the dataitem into the extra global variable. This way you can compare the records.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Sorry i might have stated the question wrongly but this rows comparison doesn't necessarily be the row directly above the one to be compare. the rows to be compared are non-static; meaning it has to loop through the table and where ever the condition is met it takes the amount from there. This Table is the Cust. Ledger Entry.
Thank you Kirki for the reply.
And can you please elaborate more on what you were saying.0 -
Each time you read a record to print, save it (but only those records that might be needed later) in a temptable (global variable on your table but with property TempTable=Yes). This way you don't need to read the real DB to find your record again (this costs DB-access), but you just read your temptable.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
Thanks Kirki. I will try that.. What do you know about saving JPEG in Navision database or TIFF? I saved a file format of BMP but it diplays only half of the file. I resized it but is still not displaying the whole the document.
Thanks for your help.0 -
Search the forum. There are a lot of topics on this.asembereng wrote:Thanks Kirki. I will try that.. What do you know about saving JPEG in Navision database or TIFF? I saved a file format of BMP but it diplays only half of the file. I resized it but is still not displaying the whole the document.
Thanks for your help.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions