Setting MaxIteration

hairyjim
Member Posts: 99
Hi,
Is it possible to set MaxIteration via C/SIDE code?
What I am trying to do is look at the first record and based on the data in a given field decide wheter to print the rest of the records or not.
Cheers
Jim
Is it possible to set MaxIteration via C/SIDE code?
What I am trying to do is look at the first record and based on the data in a given field decide wheter to print the rest of the records or not.
Cheers
Jim
Give a man a fish and he will eat for a day, teach a man to fish and he will drink beer allday.
0
Comments
-
Step 1: Set a filter onto the wanted records:
data.setrange(....)
Step 2. Count the number of recors
If data.count() > x then ....
I recommend to use proper keys e.g. data.setcurrentkey(keylist) otherwise it will slow down as count reads all records in the filtered datarange
Hope this works for you purpose0 -
Just for the record...
Please never use the MaxIteration propertie in your life.
This propety was programmed into Navision by accident. People even say M$ is nitified every time you use this property and that they are administating everyone that ever used it. These people will then be shadowed for the rest of there lifes... Really, I'm not kidding here!
Ooh, and besides that. The next programmer is spending hours and hours trying to figure out why not evey line is printed. Trust me... I've been there!"Real programmers don't comment their code.
If it was hard to write, it should be hard to understand."0 -
or try to solve this issue with integer dataitems..."Real programmers don't comment their code.
If it was hard to write, it should be hard to understand."0 -
Ok. I get the point guys
So let me elaborate on what I am trying to achieve and then hopefully someone with a little more knowledge than I can help me.
I have two tables defined on my report
Support Header table
Support Actions Table
Actions is linked to support header via Incident No.
What I wish to do is to create a report that only shows Incidents that have not had any actions attributed to them within the last seven days.
So I thought that if I sorted call actions by date (So the most recent was first) I could check whether the date on the action was 7 days ago or not. If it was not posted within 7 days then print the the incident header and all actions associated to the incident. If it was within the last 7 days then do not print anything at all.
Did I make sense? I am not sure where I need to add code to do this check and to decide whether to print the records or not.
Im stuck. Any help would be greatly appreciated.
JimGive a man a fish and he will eat for a day, teach a man to fish and he will drink beer allday.0 -
Make a flowfield on the in the header that checks if there are any Action records for that header. You will have to create a datefilter flowfilter as well.
set the correct datfilter in the report and calculate the field. Use it to check which record to print or not.
my first post was not correct : "Use the printonlyifdetails property of the Support Header dataitem. This should solve your problem.
Tip: Use a integer loop dataitem to print the header of your report. See the orderconfirmation or the invoice for a sample.""Real programmers don't comment their code.
If it was hard to write, it should be hard to understand."0 -
I think I follow.
I will go have a play and let you know how I get on.
JimGive a man a fish and he will eat for a day, teach a man to fish and he will drink beer allday.0 -
Teach a hairyjim to create flowfields and he will have a play allday. Untill he gets it on...
Mmmm...."Real programmers don't comment their code.
If it was hard to write, it should be hard to understand."0 -
You beauty!
Wow - flowfields pretty neat stuff. My report is working an absolute charm now!
Are there any decent online tutorials for C/Side? I mean its great I can ask questions on here and then refer to help files, but sometimes working through a tutorial is great.
JimGive a man a fish and he will eat for a day, teach a man to fish and he will drink beer allday.0 -
I don't know, but have look on the forum. I know you are not the only person asking for tutorials..."Real programmers don't comment their code.
If it was hard to write, it should be hard to understand."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