If you see zeroes, it probably means that the ItemNo of the current row matches that of the previous row or the Trannum value matches with that of the previous row.
({ICITEM.ITEMNO}<>previous({ICITEM.ITEMNO}) and {OESHDT.TRANNUM} >previous({OESHDT.TRANNUM}))
-Abhilash