How to hide a data band when the running total of that band is zero

I have a report that shows a list of debtors with invoices sent to them and amounts paid.


For each debtor I show the amounts of all invoices and the amounts paid


GroupHeader: 'Debtor X'

Data

Invoice 1: $100

Payment: $100

GroupFooter : total: 0


GroupHeader: 'Debtor y'

Data

Invoice 1: $200

Payment: $500

GroupFooter : total: 150


Whenever the total equals '0' then I want to hide the entire block for that Debtor. So in the above case I want Debtor X to be hidden and Debtor Y to show.

My problem is that when the running Total is calculated I can no longer hide the current block

Is there a solution for this issue?

Comments

  • It depends on the structure of your report. The most universal solution is to check the necessary data in the AfterData event for GroupHeader and change its Visible property to False.

  • It's easier to deal with sql, depending on your structure. In the where condition put: where (Invoice <> Payment or Invoice <> 0). So the select will return only debtors.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.