November 7, 2005 at 10:52 am
Hi,
I have set up reports to run once a month and want a history built up. Currently if a report is run for a second time with the 'Increment file names as newer versions are added' option selected a new file is created with the report name followed by _1 etc - e.g (Invoices_1.xls). I would like however to have the increment be a timestamp rather than an integer - e.g Invoices_20051101.xls.
Does anyone know if this is possible?
Thanks.....
November 8, 2005 at 3:20 pm
--You need to add the following sql code in to your reporting services subscription if it is automatically goes to the file location. declare @HoldFilename varchar(50), @HoldTodayDate varchar(10), @HoldToday datetime set @HoldToday = getdate() --depends on what date u want here set @HoldTodayDate = CAST(datepart(yyyy,@HoldToday) as varchar) + CAST(datepart(mm,@HoldToday) as varchar) + CAST(datepart(dd,@HoldToday) as varchar) set @HoldFilename = 'Invoices' + @HoldTodayDate
select @HoldTodayDate as StartDate, @HoldFilename as OutputFilename Bindu |
November 29, 2005 at 4:44 pm
What do you mean by:
"add the following sql code in to your reporting services subscription"
November 29, 2005 at 4:53 pm
As you go through the steps to create a data driven subscription, u will get to step 3 where it gives u a window that says:
Specify a command or query that returns a list of recipients and optionally returns fields used to vary delivery settings and report parameter values for each recipient: Use the code there and validate the results. then move on. In the next step where it says: Specify delivery extension settings for Report Server FileShare you specify the path where u gonna save the report. You need to go through each steps and specify values according to your needs.
Bindu |
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply