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

Problem with ShiftRelativeTo if create DBMemo dynamically

edited July 2002 in General
Hi,

I create two DBMemo-Fields dynamically.
The first DBMemo looks like this:

ppDBMemo1 := TppDBMemo.Create(Self);
with ppDBMemo1 do
begin
Band := ppReport1.SummaryBand;
UserName := 'DBMemo1';
CharWrap := False;
DataField := '[RepMemo1]';
DataPipeline := ppJITPipeline1;
Font.Assign(BandFont);
Stretch := True;
Transparent := True;
Height := 5;
Left := 0;
Top := 2;
Width := cPAGEWIDTH;
BottomOffset := 2;
OverFlowOffset := 0;
Leading := 0;
end;

ppDBMemo2 is similiar. Due to print both memos among each other, I have set

with ppDBMemo2 do
...
ShiftRelativeTo := ppDBMemo1;
...

At first it works. But after save and reload from database the
ShiftRelativeTo property for Memo2 is empty and the memos are one upon the
other.
Any idea?
Thanks in advance.

Michael

Comments

  • edited July 2002
    Which version of RB are you using? Is there more than one report
    instantiated at the time that this report is loaded? There is a known bug if
    this is the case where properties such as ShiftRelativeTo can be cleared
    when the report is streamed up. If you would like to try applying the patch
    send an email to support@digital-metaphors.com to request it.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

This discussion has been closed.