Showing posts with label filename. Show all posts
Showing posts with label filename. Show all posts

Tuesday, March 20, 2012

Adding the Date to Filename of DTS Export

I'd like to add the date to the file name of a DTS Export.
For Example:
Export092503.xls
I've tried various methods but nothing has worked as of yet.
Any ideas?
Thanks in Advance.
TechRickI export a standard file name, then rename using a BAT file. Here's the BAT file I use...

-------------------
@.echo off

c:
cd \SQL_Support_Applications\FTP Scripts\SONIC_Data

IF EXIST CUST_%DATE:~10,4%-%DATE:~4,2%-%DATE:~7,2%.dat DEL CUST_%DATE:~10,4%-%DATE:~4,2%-%DATE:~7,2%.dat

IF EXIST CUST_raw.dat REN CUST_raw.dat CUST_%DATE:~10,4%-%DATE:~4,2%-%DATE:~7,2%.dat

EXIT
-------------------

It checks to see if the dated file exists and deletes before renaming.|||Hi TechRick!

If I get you correct, you run an data export task in a dts package.

In this case you can use an ActiveXTask in this package to get the system date and modify the properties of the export task. A similar example is shown here: http://www.sqldts.com/default.aspx?231

Hope this helps you!

Greetings,
Carstensql

Sunday, February 19, 2012

Adding date to filename in report subscription

My company sends reports on a daily basis to our customers. Now I want to save all the sent reports on disc with the date in the filename. I have set up a subscription which daily saves the files where I want them. However, I haven't found a way to add the date easily. I already have a parameter when creating the report, it is called Date. Does anybody know if I can use a parameter or something else?

Thank's

Hello,

Sorry, I don't believe there is a way to modify the filename from a subscription, but you can specify a filename from a Data-Driven Subscription. Do a data-driven subscription to a file share, and just include an extra column in your subscription query to have something like this:

select 'Report or file name here ' + convert(varchar, getdate(), 101) as FileName, ...

Then, when you are setting the delivery extension settings, use this field as your File name.

Hope this helps.

Jarret

Thursday, February 16, 2012

Adding current date into attachment filename in reporting service

Hi there,

I have been using reporting service to generate my report and sending email with attachment report via subscription everyday. It is work well and no error.

My attachment file name is as same as reportname project. But customers asked me to add current date into an attachment filename which will help them to identify the report. I try to check in rsreportserver.config to change it but have no idea.

My reportname project is daily_file.rdl and my attachment filename in email is daily_file.csv. I'd like to change my attachment filename as day_month_year_file.csv.

Is there anyone know how to change an attachment filename to be not the same as reportname in reporting service 2005

Regards,

Hello...

I have the same question. My subscription generates a file that gets stored on our Network file server. A new file is created every day and the users want the generate date included in the name of the file that is created and saved. I see that this can be done in the e-mail subject line if your subscriptions email the users. How do you do it in the file name?


Thanks.

|||

You can't do change the name on an export, but you can take a look at a couple posts on here about using a data-driven subscription to handle this.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=168131&SiteID=1

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1311897&SiteId=1

Hope this helps.

Jarret

Adding current date into attachment filename in reporting service

Hi there,

I have been using reporting service to generate my report and sending email with attachment report via subscription everyday. It is work well and no error.

My attachment file name is as same as reportname project. But customers asked me to add current date into an attachment filename which will help them to identify the report. I try to check in rsreportserver.config to change it but have no idea.

My reportname project is daily_file.rdl and my attachment filename in email is daily_file.csv. I'd like to change my attachment filename as day_month_year_file.csv.

Is there anyone know how to change an attachment filename to be not the same as reportname in reporting service 2005

Regards,

Hello...

I have the same question. My subscription generates a file that gets stored on our Network file server. A new file is created every day and the users want the generate date included in the name of the file that is created and saved. I see that this can be done in the e-mail subject line if your subscriptions email the users. How do you do it in the file name?


Thanks.

|||

You can't do change the name on an export, but you can take a look at a couple posts on here about using a data-driven subscription to handle this.

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=168131&SiteID=1

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1311897&SiteId=1

Hope this helps.

Jarret