Sub-total each page of report
kevin.7710
Member Posts: 40
I am a beginner for Navision, I need your help, Now I meet some trouble for design the report. I want to design a report for invoice. The table source is sales header and sales line. I want to sum the field of “Sales line.Line amount” for each page . I use the section type is transfooter. But the last page is not sum. If I add a section type is footer. Then I sum the “Sales line.Line Amount”. The result is all of pages sum. Please help me how to solve the problem? Thanks!
0
Comments
-
You went in good direction - transfooter for summing at end of pages which will continue, footer at the end of whole report. From your description I am not able to understand where you have problem (or what is the problem).0
-
I use transfooter,but at the end page it didn't sum ,so I create footer to try.
I want to sum "Sales line.line amount" at the end page but not whole pages0 -
You need to create the Transfooter for correct DataItem (dataitem which is active in time when pagebreak is done). Sometime it is needed to add the integer dataitem to have correct footers. See some standard report using transfooters - e.g. Report 206 (see PageLoop dataitem).0
-
Let me clarify where I have problem - My goal is to show on each page the total price of the records that are shown on the same page, and on that page alone (not including the subtotal of the previous pages).0
-
Ah! That's an interesting task. I think I did it once but I'm not sure about all the details, but here are some clues.
- forget the automatic sums, sum stuff up in variables i.e. having a decimal variables, increasing it in OnAfterGetRecord
- basically you want to clear the variable after it's displayed on one page, so it starts from zero on the second page. If I remember correctly my solution was something like that that when it's displayed, in the OnPreSection of the transfooter I set a boolean TotalDisplayed variable to true. Then in the OnAfterGetRecord if it's true, then set it back to false and clear the decimal variable. It is before adding the current line to it. Not 100% sure it works perfectly but the general idea is this and then you can try to refine it. If it doesn't seem to work right another thing that worked with a similar requirement is having two decimals, TotalAmount and TotalAmountToDisplay and the second one got assigned the from the first one in some trigger and it helped but I don't remember the details either.0 -
It's easy - you just needs to store the values from last transfooter and subtract the values in next transfooter. Or better one - add TransHeader, store the values into some variables, and in transfooter just subtract them from the whole sum.0
-
Thanks to give me some ideas.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
