How do i change the MaxIteration Property in code in a report if a condition is fullfilled

gwaindepy
Member Posts: 13
i am designing a report that shows customer comments, i have a request form for which the user can choose to see only the latest comment. how do i achieve that using maxiteration, or is there another way. thank you
0
Best Answer
-
thank you for your effort..this is what i did to solve the problem. i used the currreport.skip with an iterator.i declared an integer variable that increments after the first comment is fetched, before displaying the 2nd comment the program checks if my iterator is 0, else it skips record.0
Answers
-
Unless you need this to be dynamic in the report viewer, the easiest way to get there is to filter the records in the dataset while generating the dataset on the NAV side.0
-
i want it to be dynamic, so that the user can tick the "show latest comment" checkbox thus showing only one comment. this however requires me to set maxiteration in code rather than in properties.that is what i am failing to do
0 -
I am not sure whether we are talking about the same thing. There are (at least) two levels of user control.
If the user selects the option on the NAV Report request page, you don't need the dataitem's MaxIteration property. You can count yourself and use CurrReport.BREAK when needed.
If the user must be able to toggle, within the Report Viewer, after the results show, the amount of comments he sees, then you always need to provide all comments in the dataset and manipulate the report layout controls. I do not have any experience with this, so I can't help you with this.0 -
thank you for your effort..this is what i did to solve the problem. i used the currreport.skip with an iterator.i declared an integer variable that increments after the first comment is fetched, before displaying the 2nd comment the program checks if my iterator is 0, else it skips record.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