I want to compair two dates like
IF "Purch. Rcpt. Line"."Promised Receipt Date" <= "Purch. Rcpt. Line"."Receipt Date" THEN
BEGIN
qty := "Purch. Rcpt. Line"."Total recived";
END
ELSE
BEGIN
qty1 := "Purch. Rcpt. Line"."Total recived";
END;
But If one of the date is zero then only the loop is going to be executed correctly .If both date fields contains date then only first part of loop will execute in any condition.
Why this happend??
How can I compair two date fields??
Answers
Check that the dates are correctly filled in "Purch. Rcpt. Line" table...
Seems correct to me also...do check the dates in the table.
For any queries you can also visit my blog site: http://msnavarena.blogspot.com/
RIS Plus, LLC
You can compair two date fields in that way you did, but you have to consider that an empty date is the lowest date ever.
Josef Metz
here if the value of first date is zero then only it execute the else part
If it is not zero then it executes only if part even it the date is 15-01-07.
This is my main problem.
I wanted to create report for vendor performance.In that report there are two columns .If the quantity is recived within the time i.e.within promice date and posting date the the quantity should be appeare in first column else it should be appear in another column.
Your code is correct. The problem seem to be elsewhere.
In wich trigger of the report did you put the code ?
RIS Plus, LLC
Can we compair dates like this
if 01-01-07 < 02-01-07 then
.....??
or
if first date is older i.e. smaller than second date then ...
Is it possible in navision??? How??
If my code is correct then why it executes only if part of the loop?? why not else loop even when I insert date smaller or greater than the recipt date???
Let me say that again: Your expression evaluates to TRUE, and therefore the TRUE part of your IF statement is executed.
If it doesn't do what you want it to do, then you rewrite the expresion in such a way that it evaluates to TRUE on your conditions, there's nothing else I can say about that.
If you don't understand the difference between true and false, or how to write a line of code to evaluate a condition, then it is probably time you found another line of work.
RIS Plus, LLC
You need to think about your code and rewrite it so that it does what you want it to do. Right now you're just asking the same question over and over.
RIS Plus, LLC
My problem is solved.
Thanku very much.
Himanshu Yadav
(Dynamics NAV)
In wich trigger of the report did you put the code ?
________________
daily deals, online shopping sites, hot deals, best deals