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

Showing report layout as a spreadsheet

edited February 2002 in General
I have built a report that produces a Grid going down the page using Shapes
and Lines.
I have 2 columns in the grid that contain text (rather than figures), and as
these can be an undetermined length, i have put these fields into DBMemo
boxes with the stretch set to TRUE so they dynamically adjust to the next
line if the text does not fit on the same line.
My problem is that when one of these Memos does go on to more than 1 line,
the Shape and the lines between the columns do not get drawn.
This results in a strange looking report.
I have a zipped image if you would like to see this.

Do you have any ideas how i could overcome this problem please ?

Thanks
John

Comments

  • edited February 2002
    Have you tried setting the line's and shape's ShiftWithParent property?


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited February 2002
    I just tried that but it just looked weird.
    I then tried setting them to StretchWithParent and things started to go ok.
    All worked fine until i set the final column separator (a line) to
    StretchWithParent and then it all went weird again.
    I have got around it by setting them all to StretchWithParent and then
    putting another line on the top of one of the others and 'not' setting that
    ones StretchWithParent.
    I am telling you all this, so you could hopefully explain to me how the
    StretchWithParent property works.
    Is the components Parent classed as the next immediate component that it is
    sitting inside. In my case i have a shape and inside the shape i have some
    Edit boxes and some lines (set to left) that are used to create the columns
    look.
    Is the lines parent, the Shape or is it the Detail section of the SubReport
    ?
    Could you explain it please ?

    Thanks
    John
  • edited February 2002
    The component's parent is the band it is located in. The other parent
    control is the Region component. If a shape lies within a region component,
    then the parent of the shape is now the region.

    From the RBuilder.hlp file:

    The StretchWithParent property determines whether the Height of the
    component stretches to match any stretching done by the Band. All stretching
    occurs vertically, and only vertical lines will stretch. Band stretching may
    occur whenever a TppMemo or TppDBMemo component has the Stretch property set
    to True and the parent band PrintHeight property has been set to phDynamic.

    ShiftWithParent applies to situations where a Stretchable component is
    stretching. If ShiftWithParent is set to True, the report component will
    move based on the amount of stretching the memo requires. When you want
    components to appear at the bottom of a memo, this is a useful feature. If
    the memo stretches to a new page, the components will print on the next
    page.


    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.