Quantcast
Channel: subscription – Sherry's BI Corner
Viewing all articles
Browse latest Browse all 6

SSRS #54 – Use @timestamp to create unique file name in Reporting Services Subscription

$
0
0

RS Subscription seems to be a constant topic in my recent blog posts. I have summarized many different ways you can use RS Subscription, especially the Data-driven Subscription.

In this post, I’ll pass on a tip about using parameter @timestamp in a non-data-driven subscription to create a dynamic/unique file name for File Share Delivery.

Original question

Here is the original question from a reader:

Hello, I need to increment the saved file with a datetime instead of a number. In Reporting Services subscriptions I have checked the" increment file names as newer versions are added" checkbox as Overwrite Options- but it is adding a number to the end of the file. Is there a way to set this up in the subscription interface in SSRS to add a datetime?

Here is my answer

Hello,

I did some research and found a couple of useful tips. I’ll pass it on to you. I have not tested it yet.

With just regular Subscription, you can add a parameter @timestamp to the end of the File Name. This will add the time the report was saved to the file name, and create unique file names.

Other parameters such as @ReportName and @TimeExecuted will not work. They will just appear as @ReportName and @TimeExecuted in the file name.

Sherry

(Note: I forgot the link to the original blog post.)

Results

I have not tested the tip, but fortunately the reader reported back with good news.

Adding @timestamp to the end of the filename worked! Thank you!

I will still recommend using Data-driven Subscription for ultimate flexibility. For example, you cannot format the parameter @timestamp in a regular RS Subscription.



Viewing all articles
Browse latest Browse all 6

Trending Articles