Change height of band at runtime?

edited 5:34AM in FastReport 4.0
I have a problem in changing height of MasterData band base on height of a filed of MasterData's dataset.
I can use the Strech mode of band and field, but in my solution this is not suitable way to solve it....

when I try to change the height of band in OnBeforPrint or OnAfterPrint events of band, my control(such as Memo) has not actually height ( the height thet after filling data) therefor the height of band is shorter than my filed's height and second MasterData band has overlap with first MasterData band!!!!!!!!!!

What event of report or band can help me to solve this problem? or
in what event of report or band I can set band height base on any control's height in that band?

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 5:34AM
    there is no need to modify the design height property of the band as this can cause objects within the band to be widowed to the page.
    ie band height 40 units memo object 10 units height placed at 30 units down from top of band.
    if you shrink the band height to 20 units before moving the the top position of the memo object up
    the memo object will no longer be on the band it will belong to the page.
    use stretch prop of band, correct shift mode prop of memo object and word wrap prop.

    if you have memo objects placed one one above the other vertically within the band and the
    upper one(s) stretch, place the lower one(S) into a child band.
    you can alter the design props in the obp event of the band but if you do you must set them back to the original settings in the oap event or the obp event code will have a cumulative effect.

    if you really want to alter output positions to the finished page use the obp event of any object and write code to use the engine object to modify curx or cury of the engine.
    read the user manual on using the engine object.

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.