Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Dynamically Positioning Regions

edited October 2005 in General
Hello,

I have a report with 5 regions layed out vertically in a detail band. The
four lower regions are all assinged the ShiftRelativeTo property of the
region above. Now I have a twist. I want region 4 to always be at least 5
inches from the top of the band. So if the bottom of the region 3 end up at
say 4in, I would want region 4 to start at 5in. If the bottom of region 3
goes to 6in then I want region 4 to start there. I tried setting the top of
region 4 in the Band before print and region on print but it didn't seem to
work. In fact it always seems the regions top property is the desing time
value in each of these events and the repositioning due to the shift
relative to happens someplace else (just a guess). How would I got about
this with the least amount of coding?
Thanks in advance for your time,
Ara

Comments

  • edited October 2005
    Hi Ara,

    One simple way to increase the size of a dynamic region is to add a shape to
    the bottom of it. For instance if you add a rectangle to the bottom of
    Region 3 and toggle its visibility and height based on the height of the
    region, you could get the effect you are after.

    The biggest obstical is determining the position of Region 3 before it has
    generated. In order to do this you will need to make an estimate based on
    the dynamic data in each region above Region 4. If there is for instance a
    DBMemo in each region, you can calculate how many lines will be in each one
    based on the text entered and using a textheight method, determine how much
    space each region will approximately use.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.