Dear All,
I wish to sort "Age account receivable" report by top N list of customer who has the highest aging will show at top and second higher will show on second row...so and so...
i ever tried to use "Net Change" field as a key in customer table to sort the customer but i can't because it's flowfield..
Any idea how to implement this by modify the existing "age accnt receivable" report?? thank in advance~~!!!
0
Comments
Take a look at the Top Customer and the Top Inventory reports in standard Navision to see how this is done. You'll need to replicate the same kind of code in your new aging report.
An easy way is to just export to Excel then manipulate it there.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
Code that i copied
============
Window.OPEN(Text000);
i := 0;
CustAmount.DELETEALL;
CurrReport.CREATETOTALS("Sales (LCY)","Balance (LCY)");
Customer - OnAfterGetRecord()
Window.UPDATE(1,"No.");
CALCFIELDS("Sales (LCY)","Balance (LCY)");
IF ("Sales (LCY)" = 0) AND ("Balance (LCY)" = 0) THEN
CurrReport.SKIP;
CustAmount.INIT;
CustAmount."Customer No." := "No.";
IF ShowType = ShowType::"Sales (LCY)" THEN BEGIN
CustAmount."Amount (LCY)" := -"Sales (LCY)";
CustAmount."Amount 2 (LCY)" := -"Balance (LCY)";
END ELSE BEGIN
CustAmount."Amount (LCY)" := -"Balance (LCY)";
CustAmount."Amount 2 (LCY)" := -"Sales (LCY)";
END;
CustAmount.INSERT;
IF (NoOfRecordsToPrint = 0) OR (i < NoOfRecordsToPrint) THEN
i := i + 1
ELSE BEGIN
CustAmount.FIND('+');
CustAmount.DELETE;
END;
Any idea?? Thank a lot's~~
OnPreDataItem()
OnAfterGetRecord()
& don't forget the code that is needed onnthe print loop -integer dataitem.
I would suggest exporting to excel too & just sort the column you want.
In fact here ya go!
http://savatage99.googlepages.com/50085 ... ngInfo.fob
http://www.BiloBeauty.com
http://www.autismspeaks.org
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
http://www.BiloBeauty.com
http://www.autismspeaks.org
Version 4 already has the option.
http://ssdynamics.co.in
http://www.BiloBeauty.com
http://www.autismspeaks.org