According to FastReport manual, you have to set SubReport.PrintOnParent
and MasterData.Stretched
to True
in order for the parent band to be stretched to match subreport's height.
How to draw a frame around a subreport which extends beyond its parent band?
-
28-06-2022 - |
Question
I have a report in which a multi-column subreport is placed on my TfrxMasterData
band. At design time, the report looks like this:
And the subreport looks like this:
I want to draw a frame around my data band, so I placed a TfrxShapeView
on MasterData1
with Align = baClient
and Shape = skRectangle
. As long as the subreport does not exceed the design-time height of MasterData1
, everything looks fine. But when there is more than four lines of data, my shape does not extend and the result looks like this:
Notice the gap between data bands? It seems that while my subreport correctly stretches to display additional lines, the shape on my master data band is not notified of this despite being aligned to baClient
. Any thoughts?
I'm using FastReport 4.13.
Solution
OTHER TIPS
I just tried this on one of my reports and I think it is doing what you want. I put the TfrxShapeView onto a TfrxSubdetailData (which is the data band that stretches in my report). On the TfrxSubdetailData, I checked the Stretched option to make it true. I aligned the TfrxShapeView to alClient and it worked. Maybe you are just missing checking the box to have the data band stretch.