SSRS 2016 - subscription subject from variable

2.6k Views Asked by At
  1. I need to pass a current date variable dynamically to SSRS subscription subject. Is it possible when using standard subscription ? I know it may be obtained using data-driven subscription but then I get report sent as many times as number of rows in the report, and I only need the report to be sent once.

    I just need to have something like "Report XXX, @GETDATE()" in subject.

  2. Is it possible to also set dynamic report name in Excel file sent using the SSRS subscription ?

1

There are 1 best solutions below

0
Ross Bush On

You can obtain the Execution Time of the report using @ExecutionTime, see this link. However, you want to make sure the execution time represents when the report was rendered or when the subscription processed the report, I am sure it is the former and it could be problematic for snapshot/cached reports. For non-cached reports this should be the current date outside of the edge case of crossing midnight server time.