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

Send email

edited July 2017 in General
Hi,

how can I determin within RAP that this report (PDF) is for a email.

My intension is to hide some controls on email a report.

Thanks in advance,
Josef

Comments

  • edited July 2017
    Hi Josef,

    Try using the Report.BeforeEmail event to alter the report before the
    report is emailed.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2017
    Nico Cizik (Digital Metaphors) wrote:


    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
  • edited July 2017
    Hi 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).


    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.