How To…Suppress Other Report Objects with Repeated DBText

Question

“I have a DBText set to Suppress Repeated Values.  Is it also possible to suppress other report objects located in the detail band if the DBText is a repeated value?”

Solution

Use the DetailBand.BeforePrint event to determine whether the current record value is repeated, then toggle the visibility of the other components in the band based on what you find.

Download: SuppressRepeatedShapeWithDBText.zip

Sample Delphi code: