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

Detail... DBText above DBRichText... How to shift DBRichText up when DBText empty?

edited July 2004 in General
DBText fields have ShiftWithParent... DBRichText does not. My layout is like
this:

DBTextObject
DBRichTextObject

When the DBText object is empty I'd like the RichText object to shift up...
How can I accomplish this?

Thanks,

Keith

Comments

  • edited July 2004
    Keith,

    Which version of ReportBuilder are you using? The ShiftWithParent property
    should exist for both the DBText and DBRichText components. All printable
    components should contain the ShiftWithParent property.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2004
    How do you check RB Version? I think I'm using version 6.??, downloaded
    5/15/03.

    I have the ShiftWithParent option on the DBRichText (when I right-click in
    the run-time designer) but it is grayed out...

  • edited July 2004
    What would cause the ShiftWithParent property to be grayed out?

  • edited July 2004
    Hi Keith,

    If you are using Stretchable components, you should use the ShiftRelativeTo
    property as the ShiftWithParent is not available when you have Stretch set
    to True. I would suggest placing you DBText into a TppRegion and have the
    RichText component ShiftRelative to that region. Be sure the region is set
    to Stretch as well.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2004
    I can't seem to get what I want... I put the DBText object into a region...
    That region has Stretch set, bottom offset = 0. I place the richtext object
    below the region with shiftRelativeTo set to the region.

    When the DBText object is blank Iwant the richText object to slide up, but
    it doesn't. Regardless it shows up below where the dbtext.

    I've tried putting the richtext object in its own region but that doesn't
    work... I've tried with all objects contained by another region (which I
    want because I want KeepTogether for the dbText and richText) but that
    doens't work either...

    This shouldn't be that hard, but I can't figure out a solution.

    Any other ideas?

  • edited July 2004
    Hi Keith,

    We will have to look at this for an improvement in a later release. As for
    now you will need to manually set the visibility of each DBText according to
    its field value. The best place to do this is probably in the
    Band.BeforePrint event. When the fields are invisible, the region will
    shrink to take up that space.

    procedure TForm1.ppDetailBand1BeforePrint(Sender: TObject);
    begin
    if ppReport1.DataPipeline['Field1'] = '' then
    ppDBText1.Visible := False
    else
    ppDBText1.Visible := True;

    if ppReport1.DataPipeline['Field2'] = '' then
    ppDBText2.Visible := False
    else
    ppDBText1.Visible := True;

    if ppReport1.DataPipeline['Field3'] = '' then
    ppDBText3.Visible := False
    else
    ppDBText1.Visible := True;

    end;

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited November 2004
    I've tried. It works

This discussion has been closed.