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

shiftrelative to

edited April 2004 in General
suppose I have 3 field to display in vertical, if a is empty, then not
display a and shift b and c upward, if b is empty then shift c upward, I
know we can use region to enclose the dbtext and set shiftrelativeto, but as
the example above, it need 3 region and if the no. of field which need this
property increase, the code becomes quite complex with many shiftrelativeto.
So is there any simpler method to complete the task of 'if a is empty, don't
show a and shift the lower component upward, then if b is empty,
shift......upward'

Comments

  • edited April 2004
    Hi,

    Instead of using three regions, try placing your dbtext objects inside one
    region with Stretch set to True. Then be sure the lower dbtexts have their
    ShiftWithParent properties set to True. This should shift the fields up
    when one is empty.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2004
    I have try your suggestion but the lower components still can't shift
    upward. IN my case, there is three label(deposit, discount amount and total)
    and three dbtext corresponding, If deposit is 0, then I set the label
    'deposit' and the corresponding dbtext visible property to false but the
    lower label 'discount' and its corresponding dbtext don't shift upward even
    their shiftwithparent properties is true, so is there any other method?
    thx!
  • edited April 2004
    I have use many time to try and find the suggested method is only work if
    there is only one region, the region surround the non-shift component and
    the shifted component is placed under the region with shiftwithparent set to
    true, but this is not enough for handle my question, my question is if there
    are a,b,c . a or b can be not visible and if this is true, b or c need to
    shift upward, if the region surrounding a & b, then if a is non-visible,
    then b can't shift upward. if the region surround a only and b and c below
    the region, then if b is non-visible then c can't shift upward, this is my
    problem in using the suggested solution
  • edited April 2004
    Hi,

    Sorry, I only did a simple test before makeing the suggestion. The only
    other option I see is to create a region for each item that needs to be
    shifted as you mentioned in your first post.

    --
    Best Regards,

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