Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSRS Dynamic Filenames for Email Subscriptions

We are in the process of migrating our reports from Crystal Reports to SSRS. In Crystal Reports we use variables to dynamically generate our filenames so when the report gets sent out via email, the file has the report name and execution date. (e.g. MonthlyReport09-07-2012.xls).

Is this possible in SSRS? I don't see any straightforward approach to using variables in the filename when subscribing to a report. This could prove troublesome when sending multiple reports with the same filename to the same person because it would be difficult to discern which report is which.

Any help is greatly appreciated. Thank you SO.

like image 922
StoriKnow Avatar asked Sep 07 '12 21:09

StoriKnow


People also ask

How do I add an email subscription to SSRS?

To configure email settings in SSRS:Open the Reporting Services Configuration Manager and click E-mail Settings. Specify the email address, SMTP delivery method, and SMTP server information and click Apply.

Can we send SSRS report as email attachment?

No, it's not possible to attach another file with an e-mail subscription from SSRS.

How do I set up subscriptions in SSRS?

Browse the web portal of a report server (SSRS Native Mode). Navigate to the desired report. Right-click the report and select Subscribe. Description: Type a description for the report subscription, maximum 512 characters.

What is a data driven subscription SSRS?

A data-driven subscription provides a way to use dynamic subscription data that is retrieved from an external data source at run time. A data-driven subscription can also use static text and default values that you specify when the subscription is defined.


1 Answers

There is no feature in SSRS as such but there is a work around for this. You have two options
Option 1:
Instead of emailing it directly first dump the file in fileshare location which can be something like \machine-name\ExportReports\ReportName\ then create a windows job which renames the file to the format you want and emails it in the next step.

Option 2:
Refer to this blog what you want starts from section "Generate a PDF output file programmatically" now you can use this in an assembly then have some scheduling mechanism which picks up the schedule. This then calls the DLL which generates the report and emails it.

like image 149
bhupendra patel Avatar answered Oct 09 '22 07:10

bhupendra patel