How to shift a subreport depending on height of memo above it?

hsmhsm
edited February 2013 in FastReport 4.0
I have a report with a couple of subreports.
In a group header is a memo that can stretch downwards if there is a lot of text.
Below the memo is a little white space and then - in the same band - is a subreport.
The subreport is in the same band as its linked to the field used for the group condition. ie it shows data related to the group condition

The trouble is that if the memo contains a lot of text it stretches downwards and sometimes will overlap the subreport.

How can I make the subreport shift downwards to maintain the whitespace and not be overlapped even if the memo stretches?

(I've tried playing with child bands but am not really sure what I'm doing and couldn't get it to work correctly.)

Attached picture shows my design.
The band 'GroupHeaderJudgementArea' is the one causing a problem (indicated by the thick blue line). It has 'stretched = true
The memo that can stretch (highlighed in yellow) has stretchmode = smactualheight.
The subreport that gets overlapped has the red dot in it.

hsm


Comments

  • edited 12:22AM
    hsm wrote: »
    How can I make the subreport shift downwards to maintain the whitespace and not be overlapped even if the memo stretches?
    Try to add TfrxChild to GroupHeaderJudgementArea and place yellow TfrxMemoView on it.
  • hsmhsm
    edited 12:22AM
    Mick.pl wrote: »
    Try to add TfrxChild to GroupHeaderJudgementArea and place yellow TfrxMemoView on it.

    Thank you Mick.
    Unfortunately that didn't work (the memo was printed after the subreport instead of before)
    However, adapting your idea I put the subreport in the child band instead together with the white space gap around it and reduced the size of the group header so the memo reached the bottom of the band. I then set the child property of the group header to point to the child band.
    Now it works OK with the memo stretching if necessary but still maintaining the desired white space before the subreport.

    Odd, as I'm sure that was one of the combinations I tried when playing around with child bands before, using examples in the user guide.
    Never mind.

    Attached is the corrected design in case it helps anyone else reading this.

    hsm
  • edited 12:22AM
    hsm wrote: »
    Attached is the corrected design in case it helps anyone else reading this.
    There's a Ship When Overlapped property of TfrxMemoView (ShiftMode := smWhenOverlapped). And it is well documented [img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> But I'm not sure if it works with subreport placed below such a Memo. Another thing to verify is subreport PrintOnParent property.[/img]

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.