Does anyone know how I might complete this type of report in FSM? Is there a canned report that I have missed?
This is an example of one item for column headers, but I would like to be able to execute this on the entire item master.
Item |
Added Date |
Status |
Orders Placed |
Last Ordered |
6001547 |
12/15/2020 |
Active |
307 |
10/20/2023 |
In V10, having access to SQL made this fairly simple (example of code below); however, in FSM I do not know how this type of aggregation could be completed unless I am exporting the needed fields from the entire Item and PurchaseOrderLine Business Classes -- of which the latter would be an obviously huge file that I imagine would take an extremely long time to process based on other large data sets I have tried to pull from FSM -- and then perform the aggregations afterwards. Not an efficient rinse and repeat.
Thank you to anyone who might have some guidance on this topic! 
SELECT
ITE.ITEM
,FORMAT(ITE.ADDED_DATE, 'yyyy-MM-dd') AS 'ADDED_DATE'
,ITE.ACTIVE_STATUS
,COUNT(PLI.ITEM) AS 'COUNT'
,FORMAT(MAX(PCR.PO_DATE), 'yyyy-MM-dd') AS 'LAST_PO_DATE'
FROM ITEMMAST ITE
LEFT JOIN POLINE PLI
ON PLI.ITEM = ITE.ITEM
LEFT JOIN PURCHORDER PCR
ON PCR.COMPANY = PLI.COMPANY AND PCR.PO_CODE = PLI.PO_CODE AND PCR.PO_NUMBER = PLI.PO_NUMBER AND PCR.PO_RELEASE = PLI.PO_RELEASE
WHERE ITE.ACTIVE_STATUS = 'A'
GROUP BY ITE.ITEM, ITE.ADDED_DATE, ITE.ACTIVE_STATUS
ORDER BY COUNT ASC