suppress level break head when the detail is zero

Bob Tsai

Active Member
When I design a report, I created level break for summary, I had level break head, if the detail section is blank, I suppressed all detail and level break foot. (summary) , but the level break head still print, how can I suppress level break head when the detail is zero?
Thanks
Derek
[laugh]
 
Derek,

The reason the header shows up is because it has already printed by the time you get to the Detail section. The best way to keep it from printing is to try to exclude those records from hitting the detail section at all. So what does it mean when you say - detail is blank or detail is zero? If it means you want to avoid record with a zero quantity, then you need to try to filter them out ahead of time. If it is a calculated field then you need to either do the calculations up front - and put them in a work file, or programmatically call a custom section that works 'like' a header section.

Ben again,
 
The short answer is: you can't. The lvlbrk header prints before any detail lines are printed.

The long answer is: You can create your own 'conditional' section to act like your lvlbrk header. This option, however, requires you do all the coding yourself. Basically, you would Do Custom Section(your lvlbrk header) only on the first detail record in the 'Do Section' of your detail section. You would also be responsible for populating the report fields in your custom section as you would no longer have access to the bsvw fields.

Good luck
 
Back
Top