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

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

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.

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: