Email dialog caption
Hello
I have been trying unsuccessfully to change the caption of the default
RBuilder email dialog and just saw Nico's response to Bob Tucker's post on
2/16/2011 where he states that the email dialog properties are not currently
exposed.
I have tried at development time to modify the ppEmailDlg unit by placing
Caption := 'my text'; in the OnShow event, but I have had no luck.
Based on the above, I have two questions.
1st question
How can I modify the existing ppEmailDlg unit to create the caption that I
want?
2nd question
Instead of modifying the existing ppEmailDlg, is there a mechanism in code
to simply replace the call to ppEmailDlg with a CustomEmailDialog unit to
that I can use either the original or the customized unit based on a call I
make in code at run time?
Currently, I a) access the PreviewForrmEmailClick event to the
ppPrintPreview (see directly below) and
procedure TRBReportRequestLetter2.ppReport1PreviewFormCreate(Sender:
TObject);
begin
TppPrintPreview(ppReport1.PreviewForm).EmailButton.OnClick :=
PreviewFormEmailClickEvent;
with ppReport1.PreviewForm do
begin
Height := 600;
Width := 800;
end;
end;
then b) access the Report.EmailSettings via the TppEmail object's
EmailSetting property (see code below)
procedure TRBReportRequestLetter2.PreviewFormEmailClickEvent(Sender:
TObject);
var
tempEmail: TppEmail;
begin
......... etc
tempEmail := TppEmail(ppReport1.Email);
......... etc
end;
TIA
John
I have been trying unsuccessfully to change the caption of the default
RBuilder email dialog and just saw Nico's response to Bob Tucker's post on
2/16/2011 where he states that the email dialog properties are not currently
exposed.
I have tried at development time to modify the ppEmailDlg unit by placing
Caption := 'my text'; in the OnShow event, but I have had no luck.
Based on the above, I have two questions.
1st question
How can I modify the existing ppEmailDlg unit to create the caption that I
want?
2nd question
Instead of modifying the existing ppEmailDlg, is there a mechanism in code
to simply replace the call to ppEmailDlg with a CustomEmailDialog unit to
that I can use either the original or the customized unit based on a call I
make in code at run time?
Currently, I a) access the PreviewForrmEmailClick event to the
ppPrintPreview (see directly below) and
procedure TRBReportRequestLetter2.ppReport1PreviewFormCreate(Sender:
TObject);
begin
TppPrintPreview(ppReport1.PreviewForm).EmailButton.OnClick :=
PreviewFormEmailClickEvent;
with ppReport1.PreviewForm do
begin
Height := 600;
Width := 800;
end;
end;
then b) access the Report.EmailSettings via the TppEmail object's
EmailSetting property (see code below)
procedure TRBReportRequestLetter2.PreviewFormEmailClickEvent(Sender:
TObject);
var
tempEmail: TppEmail;
begin
......... etc
tempEmail := TppEmail(ppReport1.Email);
......... etc
end;
TIA
John
This discussion has been closed.
Comments
To answer your second question, this is the recommended method to alter the
dialogs in ReportBuilder. That way you don't have to keep editing the
source each time we release. Take a look at the following article on
replacing dialogs in ReportBuilder.
http://www.digital-metaphors.com/rbWiki/Plugins/Dialogs/Replaceable_Dialogs
If you create a new custom email dialog, you can alter the caption manually
to meet your needs. You might also try using the OnCreate event of the
form. Be sure that you have the Source directory in your library path if
making changes to the source.
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks
John