These kinds of questions are valuable to an employer to determine what a propective employee knows, but it's even more valuable to you because it gives you an opportunity to hone your programming skills.
Before we give you the ans why don't you tell us what your thinking on the subject is. You don't have to be right on in your ans. It can just be a starting point for the ultimate ans and it might get you to understand (and enjoy) the problem solving aspects of the job.
I feel the answer is option b i.e. print the detail record and increment the totals.
But I have seen some reports where there are sub-totals in each page and a final total at the end.
So it altogether becomes a question of requirement of the report.
I posted this query to know if one of the two options is much desirable than the other.