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

Shrinking regions when contents empty

edited April 2002 in General
I have a number of regions in my report, some nested, with TppDBText and
TppDbMemo components inside them. Each region has to have sufficient height
to contain the components and is set to stretch to match the memo's within
it. This is fine, but sometimes these components are empty. In that
situation I need the region to shrink, otherwise I get blank spaces in my
report.

Is there any way I can shrink regions when some of the the components they
contain are empty?? Or perhaps it is a matter of being able to "place"
components within a region without the region having much height?

Sarah

Comments

  • edited April 2002
    Ah... just read that you can't have regions within regions so not sure what
    I have done with what I thought was nesting? Will have a look at that!

    Anyway, my shriking a region question still stands.
  • edited April 2002
    You need this custom component. In this demo there is also a modified
    dbDemos biolife table with an empty memo record to connect test with. If you
    launch the designer and load the supplied report template it will run off of
    the data access components on the form.

    http://www.digital-metaphors.com/tips/AutoHideRegion.zip


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited April 2002
    Thanks Jim, but with RB 6.03 pro I don't have ppEndUsr... there may be other
    things I'm missing to for looking at this. So Can't try the demo :((

    But I will have a look at the code to see if I can get the idea.

    Sarah
  • edited April 2002
    Sorry, it was created with RAP initially as part of the solution. I just
    ran it with my D5 RB Pro 6.03 install. Take out the raIDE, and raCodMod
    from the uses clause. 'Ignore' the property not found errors. You should
    be able to load the AutoHideRegion.rtm template in the zip file add see that
    the region is not shown when the memo inside of it is empty- you should see
    that all of the details have memos inside of them and that none of them are
    blank. You can create add a regular memo in this report to see the
    difference.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited April 2002
    Actually, you should be able to right click over he component and deselect
    the HideWhenMemoEmpty property to see the skipped records.


    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.