Designer: OnCustomOpenDoc failure
I have a strange issue.
If I use OnCustomOpenDoc event of ppDesigner (to change caption of the
editor window), when I try to load an rtm, an explorer window is showed
to select appropriate rtm, after that rtm is selected and confirmed,
the editor popping up a window for a little while (some milliseconds)
and then it disappear fast, but the rtm showed is the previous one.
If I remove the handling of OnCustomOpenDoc event, all is working
properly.
You can reproduce this issue with a simple tipical project1 application
that uses this event. It is sufficient using the event with blank code,
like this:
procedure TForm1.ppDesigner1CustomOpenDoc(Sender: TObject);
begin
; // do nothing
end;
When the event is removed, the ppEditor back to working properly.
Is this a known bug? How do I can solve/bypass this?
Thank you in advance,
best regards
--
Morde
If I use OnCustomOpenDoc event of ppDesigner (to change caption of the
editor window), when I try to load an rtm, an explorer window is showed
to select appropriate rtm, after that rtm is selected and confirmed,
the editor popping up a window for a little while (some milliseconds)
and then it disappear fast, but the rtm showed is the previous one.
If I remove the handling of OnCustomOpenDoc event, all is working
properly.
You can reproduce this issue with a simple tipical project1 application
that uses this event. It is sufficient using the event with blank code,
like this:
procedure TForm1.ppDesigner1CustomOpenDoc(Sender: TObject);
begin
; // do nothing
end;
When the event is removed, the ppEditor back to working properly.
Is this a known bug? How do I can solve/bypass this?
Thank you in advance,
best regards
--
Morde
This discussion has been closed.
Comments
I forgot to indicate my RB version:
I'm using D7 with RB 9.03 ent. ed.
Thankyou
--
Morde
procedure TForm1.Button1Click(Sender: TObject);
begin
ppDesigner1.OnCustomOpenDoc := MY_Designer1CustomOpenDoc;
ppDesigner1.ShowModal;
end;
procedure TForm1.MY_Designer1CustomOpenDoc(Sender: TObject);
begin
; // DO NOTHING
end;
Backing up to nil the event, it works.
procedure TForm1.Button2Click(Sender: TObject);
begin
ppDesigner1.OnCustomOpenDoc := nil; // it works
ppDesigner1.ShowModal;
end;
--
Morde
This is working as designed. When the OnCustomOpenDoc event is assigned,
full control of loading the report is given to you. This means that you
must provide all of the report loading logic in order to properly
view/design a report.
If you would simply like to change the caption of the designer window before
it loads, I suggest using a different event such as OnShow.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
OMG...I didn't totally understand what helps says!
Many thanks
bye
--
Morde