Item related productions in a report grid with in a given date ranges

I am developing excise reports in morphx.I got some problem with getting all records in the production for the particular item. Im adding all datasources into query node.i write display methods for displaying particular fields in the reports.For getting of those productions i wrote some display method.it returns only last value of the report.Can anyone suggest how to get all productions for that particular item.my code is like this

while select * from InventTable join ProdId,ItemId from ProdBOM

join ProdId from ProdTable where ProdBOM.ItemId == InventTable.ItemId

&& ProdTable.ProdId == ProdBOM.ProdId && ProdTable.FinishedDate >= FromDate

&& ProdTable.FinishedDate <= ToDate

&& ProdTable.ProdStatus == ProdStatus::ReportedFinished

{

mfgoutput = ProdTable.ItemId;

}

return mfgoutput;