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.
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.
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.
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;
Comments
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.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
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...
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.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
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?
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;
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com