I have modified the sales history report to display the quantities on hand by using the appropriate fields from the Item table. When I drop in the field "quantity on purchase order", only one item shows quantity even though by running the object designer and opening up the item table directly, I show the field populated on MORE than just one item. As well as just knowing that there is an open purchase order for more than just the one item. Is there anything I have to put int the OnAfterGetRecord or something to get Navision to accurately display the data? Or maybe another method? Please help. ](*,)
0
Answers
RIS Plus, LLC
Maybe you're using Qty. on Prod. Order instead of Qty. on Purch. Order :?:
What's interesting is that if I sort the report by vendor number instead of item number, a different item shows quantity. It seems that the report is only pulling up the first item on the report so it IS calculating them correctly but only displaying the first one it finds.
Please help, I'm lost on what to even try next.
Is the report run on the Item record?
You say sorting by "Vendor No.", its not filtering the Purchase Qty lines by The Item Vendor No. is it?
If it is and the Item Vendor is different from the one on the purchase order, No Value.
Check this first
OnPreReport
MESSAGE('%1',Item.GETFILTERS);
Have a look at what They are
If you are happy then
Create another Variable for the Item table, get the item and do your "Qty. On Purchase Order"
On PreReport
Item2.RESET;
//Only copy the filters you want across, look at how the syntax is for this one, I am not on Navision at home.
Item.CopyFilter(Item2.FieldName,FieldName)
On after Get Record
Item2.SETRANGE("No.",Item."No.");
Item2.CALCFIELDS("Qty. on Purchase Order");
// Update the value, it's a flowfield and it won't do any harm :roll:
"Qty on Purchase Order" := Item2."Qty. on purchase Order"
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com
When I said "sorting by Vendor No." I just mean clicking the sort button button before running the report and choosing a different key.
The report is run on the Item record. I have double cheked a few PO's and made sure that the vendor no's were all correct and the same as what is on the Item card
When I run the report the only filters I am using is:
Qty. on Purch. Order = >0
If I use a different filter (such as Vendor or Inventory Posting Group) I get more than one result but the Qty. on Purch. Order field is always 0
I'm going to try your suggestion about creating another variable right now an I will let you know how it works out.
It would be worth looking at the flowfield to see what filters affect the "Qty. on Purchase Order".
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com
Rather than filtering on a flow field, which might be part of the problem
Maybe better on the Section,
Currreport.SHOWOUTPUT("Qty. on Purch. Order"=>0);
If you want to be able to report any value, the just add a flag and label to the request form, and a boolean variable ShowGreater then if checked.
IF ShowGreater THEN
Currreport.SHOWOUTPUT("Qty. on Purch. Order"=>0);
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com
Document Type=CONST(Order),Type=CONST(Item),No.=FIELD(No.),Shortcut Dimension 1 Code=FIELD(Global Dimension 1 Filter),Shortcut Dimension 2 Code=FIELD(Global Dimension 2 Filter),Location Code=FIELD(Location Filter),Drop Shipment=FIELD(Drop Shipment Filter),Variant Code=FIELD(Variant Filter),Expected Receipt Date=FIELD(Date Filter)
these are the filters on the Item table for the field "Qty. on Purch. order"
So maybe the second variable is the way to go, with no location or date filter applied, how about dimensions 1 and 2 are these filtered?
Anyway I think you should be able to sort it now! \:D/
Its 23:15 in the UK, [-( any more! :-({|=
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com
Thanks again guys!