Childhood obesity is still increasing despite the success of a healthy school meal drive, inspectors have said.
The report said primary school children were eating healthier
Her Majesty's Inspectorate of Education (HMIE) said the Hungry for Success initiative had encouraged many pupils to eat fruit instead of fatty snacks.
But the report accused secondary schools of a "lack of urgency" in fully implementing the Scottish Government scheme since it was launched in 2003.
And it said pupils needed to get more exercise alongside healthier food.
HMIE inspectors surveyed 165 primary schools, 23 special needs schools and 35 secondary schools across Scotland between 2005-2007.
The study found that during that time around 46% of pupils took school meals.
Primary schools in particular were found to have made good progress in improving meals and the lunchtime experience of pupils.
Inspectors cited the improved provision of fruit and drinking water and more healthy choices in tuck shops and vending machines as a success.
Many schools have improved the presentation of meals and most provided a pleasant atmosphere for pupils to eat and socialise with friends, inspectors said.
In secondary schools, peer pressure meant the programme had less of an effect on influencing pupils' eating habits.
Inspectors said a "lack of urgency" in implementing the scheme was also to blame.
The report questioned the effectiveness of the programme unless it was combined with an increase in physical exercise among pupils.
Senior inspector Graham Donaldson said: "Hungry for Success has been successful in meeting many of its aims and there have been notable improvements in the quality of school meals in Scotland.
"It is unfortunate, however, that the period of successful implementation of Hungry for Success has been paralleled by increasing levels of childhood obesity and inactivity."