Hi, I've a report on, in sections, calculate the "Invoiced Quantity" rotation. It do it on the last 6 months, 3 months and it runs well. But and now I want 1 month (the last month), but I can't. I've the following:
//6 Months
"Item Ledger Entry".SETRANGE("Posting Date",CALCDATE('<-6M>',WORKDATE),WORKDATE);
//3 Months
WITH "Item Ledger Entry" DO BEGIN;
IF ("Posting Date" >= CALCDATE('<-3M>',WORKDATE)) AND
("Posting Date" <= WORKDATE) THEN
3Month:="Invoiced Quantity";
END;
How can I do the last month, please?
Thanks in advance.
0
Comments
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
If you want to calculate this based on a day then -1M & +1M
Pargesoft
Thanks you very much, it works!!, but only a thing. I put it in a body section and in footers shows the variables of each rotation. If I put the code like this, all show the same rotation. I need dump the result to a variable as I did on 3 months for example. How can I do it please?.
Thanks for your help.
Your value is repeating, It seems that you have not initialized the variable.
I didn't understand exactly. What's the difference between 3 months and 1 month? If 3 months works as you want then 1 month range should do too.
I suggest debugging. This way you can see what happens in your report step by step.
Pargesoft
I didn't understand exactly. What's the difference between 3 months and 1 month? If 3 months works as you want then 1 month should do too.
I suggest debugging. This way you can see what happens in your report step by step.
Pargesoft
//First I calculate 6M:
"Item Ledger Entry".SETRANGE("Posting Date",CALCDATE('<-6M>',WORKDATE),WORKDATE);
//After 3M:
WITH "Item Ledger Entry" DO BEGIN;
IF ("Posting Date" >= CALCDATE('<-3M>',WORKDATE)) AND
("Posting Date" <= WORKDATE) THEN
Sum3M:="Invoiced Quantity";
END;
And now i want to calculate the last month. The I create Sum1M variable and try to do the code. I suppose that it should be as easy as do the same that with 3M did, but doesn't works. I've try that you answered:
SETRANGE("POSTİNG DATE",(calcdate('<CM-2M+1D>',WORKDATE)),(calcdate('<-CM-1D>',WORKDATE)))
but i can't asign it the result to my Sum1M variable. How can I do it please?.
Thanks in adavance.
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
and also where did you write?
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Well, thank you very much for your help and time. Sorry for the dismissal.
Thanks again.