Reputation: 83
Is it possible for SSRS to name and separate pdf exported files based on parameter groupings? Right now, when I run the report, it only gives me one pdf with 100+ pages. However, at every page-break, I'd like SSRS to create a new pdf file, and it'd be a real time-saver if it would also insert the pdf's filename based on the grouping selection.
Is this possible in SSRS, or do i need to use SSIS for this functionality?
I'm using 'Visual Studio 2010' for SSRS, and 'SQL Server 2012' for integration services
Upvotes: 3
Views: 8695
Reputation: 10860
You would be able to do all of what you want in SSRS - if you have the Enterprise edition that has Data-Driven Subscriptions.
https://msdn.microsoft.com/en-us/library/ms159150(v=sql.130).aspx
You would have a parameter for the grouping (your page-break) - for example UserID.
In your data-driven query (NOT the report but a different query used to fire the subscription), you would have a field for your grouping - your UserID in our example. Another field could have your ReportName that is derived from your data - ex.
UserID, 'ReportName for ' + UserName + ' on ' + GetDate() as ReportName
When the data-driven query runs, it will create a record for each UserID which in turn will fire a report for each UserID using it as the parameter to limit the report to just that userID. You could even have that report only e-mailed to that user.
There are ways to run data-driven subscritptions without the Enterprise Edition using SSIS but the do take a bit of work.
http://geoffbi.blogspot.com/2012/04/data-driven-subcriptions-in-standard.html
Upvotes: 1