I would like to show from this month "Purch.Order quantity" to next month in my Report. Does anyone have any ideas how i can do this?
SBHaTBNg's suggestion might work, it depends on what you need. His code will show you the order quantity for unposted purchase lines (which is a both requisitions, orders, unposted invoices and credit memo) with a posting date this month. But I think that's not really what you are looking for?
But the few time I had a customer asking me for a "Monthly Purchase Order Report", then they needed to see the purchase order quantities for that both, both posted and unposted. In your case, as for what I can read out of your question, then what you need is a report, which shows the purchase order quantities for open orders with an order date in this month, but with an expected receipt date next month?
If that is the case, then it get's a bit more complex, as you cannot use the calcsums function. You could do something like this:
PROCEDURE GetPurchaseOrderQuantityNextPeriod(CurrentMonthStart,CurrentMonthEnd,NextMonthStart,NextMonthEnd) : Decimal;
// Local Vars: OrderQty : Decimal;
OrderQty = 0;
WITH PurchaesLine DO BEGIN
SETRANGE("Document Type","Document Type"::Order);
IF ISEMPTY THEN EXIT(0);
IF ("Expected Receipt Date" >= NextMonthStart) AND
("Expected Receipt Date" <= NextMonthEnd)
OrderQty += "Outstanding Quantity";
UNTIL NEXT = 0;
I expect that you know how to calculate the dates before calling the function. And it's quite easy to change to filter on specific items etc.
Have a great day, Erik