About subtotal by everypage

4711
Member Posts: 15
i face a problem.
i use this codeunit to realize every page has 10 rows in the report which only has one dataitem integer.
IF Number = 1 THEN BEGIN
Test1.FIND('-');
i := 1;
END ELSE BEGIN
IF Test1.NEXT = 0 THEN
CurrReport.BREAK;
IF i = 10 THEN BEGIN
CurrReport.NEWPAGE;
i := 0;
END ;
i += 1;
END;
now i want to get a subtotal of a colum "Amount" in the record Test1 by every page ,how could i realize that?
Btw,I found that when i used function newpage,the section transfooter have no effect on the report.
Thank you for your help
i use this codeunit to realize every page has 10 rows in the report which only has one dataitem integer.
IF Number = 1 THEN BEGIN
Test1.FIND('-');
i := 1;
END ELSE BEGIN
IF Test1.NEXT = 0 THEN
CurrReport.BREAK;
IF i = 10 THEN BEGIN
CurrReport.NEWPAGE;
i := 0;
END ;
i += 1;
END;
now i want to get a subtotal of a colum "Amount" in the record Test1 by every page ,how could i realize that?
Btw,I found that when i used function newpage,the section transfooter have no effect on the report.
Thank you for your help
0
Comments
-
You should use Transfooters section. Is there a reason why you aren't using them?0
-
i have used it,but it have no effect.
so i think maybe i need to add some codeunit to realize that function.0 -
i have found the solution in the previous forum.
only need to define two variable.TotalToDisplay,TotalToCalculate
and then in the trigger foot-onpresection TotalToCalculate :=0;
in the trigger onaftergetrecord
TotalToCalculate += Test1.Amount;
TotalToDisplay := TotalToCalculate;
that will be ok.i think it's really very simple and useful.
but i still misunderstand why the transfooter have no effect when used the function newpage.0 -
Just adding a transfooter doesn't do the trick, you also have to set up the field to create totals, and the command is CREATETOTALS, and it goes in the Predataitem trigger I think.0
-
i have tested transfooter for many times.
i also have used createtotal or property totalfield.even i only put a label in the tranfooter,but if i used newpage,it would be unavailable.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
- 320 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