Email with autosearch dialog
Hi,
This is using D2010 and RB 11.07
I have a custom report explorer with an email button that fires this code.
Not sure if it's correct but it appears to work. The only thing missing is
that the autosearch dialog never appears, the whole report without any
criteria applied just gets generated to email (in ExtraDevices PDF format if
that makes any difference). I have applied a recent ppEmail patch you sent
me which I thought might resolve the issue but it didn't.
What else can I do to force it to display the autosearch dialog before
generating please?
Should I be getting a reference to the report differently?
//ActiveItem is a string propert on the custom form
procedure TReportExplorerForm.actionSendmailExecute(Sender: TObject);
begin
ActiveItem := FListView.ItemName;
if FReportExplorer.IsReport(ActiveItem, FListView.FolderId) then
begin
FReportExplorer.LoadReport(ActiveItem, FListView.FolderId);
FReportExplorer.Designer.Report.EmailSettings.FileName := ActiveItem;
FReportExplorer.Designer.Report.DeviceType := 'PDFFile';
FReportExplorer.Designer.Report.ShowAutoSearchDialog := True;
FReportExplorer.Designer.Report.SendMail;
end;
end;
Thanks in advance.
Regards, Paul.
This is using D2010 and RB 11.07
I have a custom report explorer with an email button that fires this code.
Not sure if it's correct but it appears to work. The only thing missing is
that the autosearch dialog never appears, the whole report without any
criteria applied just gets generated to email (in ExtraDevices PDF format if
that makes any difference). I have applied a recent ppEmail patch you sent
me which I thought might resolve the issue but it didn't.
What else can I do to force it to display the autosearch dialog before
generating please?
Should I be getting a reference to the report differently?
//ActiveItem is a string propert on the custom form
procedure TReportExplorerForm.actionSendmailExecute(Sender: TObject);
begin
ActiveItem := FListView.ItemName;
if FReportExplorer.IsReport(ActiveItem, FListView.FolderId) then
begin
FReportExplorer.LoadReport(ActiveItem, FListView.FolderId);
FReportExplorer.Designer.Report.EmailSettings.FileName := ActiveItem;
FReportExplorer.Designer.Report.DeviceType := 'PDFFile';
FReportExplorer.Designer.Report.ShowAutoSearchDialog := True;
FReportExplorer.Designer.Report.SendMail;
end;
end;
Thanks in advance.
Regards, Paul.
This discussion has been closed.
Comments
is found.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com