dameng
Senior Member
  

DBA / EVO Software Consultant
Posts: 275
Gender:
|
i use a Stored Procedure for my Crystal Report for Inventory Usage. basically it sums the qty by transaction type on the INVTXN file for (J,I,M,S) types grouped by Item Code for the past 12 months. here is a segment of the SP, becuase i also return other values useful for that type of report. i have it linked with the BKICMSTR and MTICMSTR SELECT SUM(IV.MTIT_QTY) FROM INVTXN IV WHERE IV.MTIT_TYPE IN ('J','I','M','S') AND (IV.MTIT_DATE > CURDATE() - 365) AND (IV.MTIT_CODE = IC.BKIC_PROD_CODE) GROUP BY IV.MTIT_CODE the Usage Report that one views in IN-A is calculated everytime you clik on that Usage button using the similiar logic. hth
|