Primary schools should identify pupils whose behaviour may be at risk of deteriorating when they reach secondary school, a report for Ofsted suggests.