How To…Calc a Dynamic Detail Height


“How do I calculate the height of each dynamic detail band’s height as the report is generating?”


Use the DetailBand.BeforeGenerate to find the top of each band and the DetailBand.AfterPrint event to find the bottom and calculate the height.  Do this during the first pass of the report to find each height before the report actually prints.


Sample Delphi code: