How can I shrink a Master band?

Hello,

I have a master band with 3 memo.

memo1
memo2
memo3


Now if a memo is empty band appear with the same height.

memo1
(empty space for memo2 when it has no data)
memo3

I only found how to make the height grown (with the Stretch property), butI can no shrink it.

I want to shrink the band if some memo is empty. Is it possible? HOw can I do it?


Thanks in advance.

Comments

  • gpigpi
    edited 10:21PM
    Try to use child bands for memo2 and memo3. Hide child bands when memos is empty and set band's property PrintChildIfInvisible to True
    Also you can use one memo instead of three memos
  • edited 10:21PM
    ...
    I have a master band with 3 memo.
    memo1
    memo2
    memo3
    ...

    Try this idea in OnBeforePrint event for your MasterData band:
    if  MyMemo2Empty  then
    begin
        SaveMemo2Height := Memo2.Height;
        SaveMemo3Top := Memo3.Top;
        Memo2.Height := 0;
        Memo3.Top := Memo2.Top;
        MasterData1.Height := Memo3.Top + Memo3.Height;
    end
    else begin
        Memo3.Top := SaveMemo3Top;
        Memo2.Height  := SaveMemo2Height;
        MasterData1.Height := Memo3.Top + Memo3.Height;
    end
    

    Regards
    Mick

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.