HI all,
Im guessing this is pretty straight forward for some of you experienced developers, however I have a headache trying to figure it out.
I want to run a report and for each record it parses I want to check the order date and if it falls within a date range then set a value in another field.
If "Sales Header"."Order Date" 28/04/07..24/05/07 THEN
Period := P5;
Obviously this does not work.
Anyone help?
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
explanation: the first line select all the records within the value you want.
surely you can put a text variable replacing '25/11/02..26/12/03'.
the second line find the first record within the range you selected and after begins a loop that changes the value of all the fields you want to another value. the loop ends with the "until yourtable.next = 0;" line
think at this line like an "EOF"
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
With this you want only the records (there is only 1) of "Order Date" AND the records in your filter. If "Order Date" falls also in the range, I will have 1 record. If it doesn't fall into the range, I WON'T have a record.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
:oops: :oops: :oops: :oops: :oops: :oops: :oops: :oops: :oops:
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog