Unfortunately there is no easy way to determine whether a report is emailed from within a dynamically loaded subreport in RAP.
Have you considered creating multiple header templates for each scenario (View, Print, PDF, Email, etc.)?
Another option would be to create a report parameter which could be accessed from the subreport in RAP letting you know if the report is emailed or not. You would need to create this parameter in Delphi either from the BeforeEmail event or perhaps in the OnClick event of the email button (Preview Plugin).
Comments
Try using the Report.BeforeEmail event to alter the report before the
report is emailed.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thank you for your answer. Still it is not the solution which makes me
happy.
My situation:
We have Report1 (Headerdefinition) which is loaded in other reports as
a subreport. The controls to be changed are in this headerdefinition.
I found out, that Report.BeforeEmail is not allowed in subreports.
Therefore I could not make my change at one place, but I have to do it
in every report.
I was looking for a methode to determin whether it is for email in the
subreport without changing all my reports.
Regards,
Josef
Unfortunately there is no easy way to determine whether a report is
emailed from within a dynamically loaded subreport in RAP.
Have you considered creating multiple header templates for each scenario
(View, Print, PDF, Email, etc.)?
Another option would be to create a report parameter which could be
accessed from the subreport in RAP letting you know if the report is
emailed or not. You would need to create this parameter in Delphi
either from the BeforeEmail event or perhaps in the OnClick event of the
email button (Preview Plugin).
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com