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

Calculate Dynamic of TppDBMemo before it prints

edited May 2003 in General
Hello All:

We have a report structured as follows
shape11 shape21
DBmemo11 DBMemo21
shape12 shape22
DBmemo12 DBMemo22
shape13 shape23
DBmemo13 DBMemo23

We need to determine the height that the memos will be when they print.
This is so that we can properly space each control in each column.

In some cases, shape22 & DBMemo22 would have visible=False and in these
cases shape13 and shape23 must have their tops aligned, etc.

How can we tell what the height of a Memo will be at runtime ??? Do I
use the Report.Canvas.TextOut ??? If so, how would this work ???

Is there a better way to accomplish my objectives ???

Thank you.

Neil Huhta

Comments

  • edited May 2003
    Neil,

    It looks as though you can solve this problem by placing 3 regions around
    each set of shapes and memos (side by side). For example region 1 will have
    11 and 21, region 2: 12 and 22, and region 3: 13 and 23. Then by setting
    the regions to KeepTogether and ShiftRelativeToParent, you should receive
    the results you
    are after.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2003
    Nicco:

    I still have one problem with that solution - sometimes the middle level
    is completely omitted.

    I cant delete the middle level - if I set it to invisible that wont
    work. Could I set its height to 0 ??? Thank you.


    Neil Huhta
  • edited May 2003
    The region approach is what should work. Make sure all the controls are in
    the proper regions. For example, based on you first email's description:

    Region2---------------------------
    | shape12 shape22 |
    | DBmemo12 DBMemo22 |
    -----------------------------------

    If shape22 and DBMemo22 are not visible, then the height of Region2 will be
    that of shape12 and DBMemo12. Then Region3 below it will be aligned to the
    bottom of Region 2. Subsequently, shape13 and shape23 will have their tops
    aligned because they are parented by Region3. Does this not work? If you
    can't get it to work, send me an example report and I'll make it work for
    ya. Send to support@digital-metaphors.com


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.