How to clear value just after it is printed?
gumwitka
Member Posts: 34
Hi All,
How to clear value (here: BudgetQuantity) just after it is printed?
In section GroupFooter I group some jobs by companies and for each company I would like to have sum for BudgetQuantity visible
OnPostSection for this GoupFooter I wrote:
IF CurrReport.TOTALSCAUSEDBY = FIELDNO(Job.Company) THEN
CLEAR(BudgetQuantity);
But I keep receiving 0, because value cleared before it is printed.
What shall I do?
How to clear value (here: BudgetQuantity) just after it is printed?
In section GroupFooter I group some jobs by companies and for each company I would like to have sum for BudgetQuantity visible
OnPostSection for this GoupFooter I wrote:
IF CurrReport.TOTALSCAUSEDBY = FIELDNO(Job.Company) THEN
CLEAR(BudgetQuantity);
But I keep receiving 0, because value cleared before it is printed.
What shall I do?
0
Answers
-
why there is this code? The purpose of this is not clear for me.IF CurrReport.TOTALSCAUSEDBY = FIELDNO(Job.Company) THEN CLEAR(BudgetQuantity);
OnPostSection
This trigger should only be used to perform processing that has to do with the visual output of the report - not processing of data.0 -
I need to clear this value for each company, otherwise for next company I will receive sum or all that were printed before.
If I add this line OnPreSection the result is the same. I just put it OnPostSection because I thought that this way it will first show value then clear.0 -
You can use CurrReport.CREATETOTALS(BudgetQuantity) to create sums per group like if it is field from the table (you just needs to assign the value in OnAfterGetRecord of the Dataitem and rest is on Nav. You just print the BudgetQuantity on the GroupFooter and you will have there sum for the group. It is same like if some field is in GroupTotalFields property of the dataitem.0
-
it worked :!: Thank you Kamil \:D/0
-
You are welcome!
Please, shall you add the [SOLVED] prefix into the subject of your first post? Thanks.
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
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 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
