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
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
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 purpose
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!
If it was hard to write, it should be hard to understand."
If it was hard to write, it should be hard to understand."
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.
Jim
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."
If it was hard to write, it should be hard to understand."
I will go have a play and let you know how I get on.
Jim
Mmmm....
If it was hard to write, it should be hard to understand."
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.
Jim
If it was hard to write, it should be hard to understand."