July 15, 2008 at 5:57 am
Hi,
Please suggest what should i do to get the current date appended to my report name while exporting it to excel.
I got the following suggestion from my friend:
In your file connection set your Expression for ConnectionString to something like (replace your actual path and extension) ..
"F:\\Projects\\Test\\SimpleImportCSV\\SimpleImportCSV\\ImportTestCSV" + SUBSTRING((DT_STR, 30, 1252)(GETDATE()), 1, 10) + ".txt"
This will return path and filename with date.
Will give you ..
F:\Projects\Test\SimpleImportCSV\SimpleImportCSV\ImportTestCSV2007-11-22.txt
But i could not find connection string for file name in my rdl. There is a connection which has the server name and the credentials but there is nothing related to the name of the report. Please help me on this.
Thanks,
Deepti
July 15, 2008 at 6:21 am
You can use Globals!ReportName
July 15, 2008 at 10:43 pm
Hi,
Thanks for the reply. But can you please elaborate. Where is this Globals!Reportname? Me new to SSRS.
Thanks,
Deepti
July 16, 2008 at 12:09 am
Hi Dity,
When you click on expression of any TextBox you can see the Edit Expression dialogue box which is shown in attached image.
Here, you can select Globals from left side, double click on ReportName in right side.
I hope it is clear now!
July 16, 2008 at 12:49 am
Hi Hari,
Thanks for actually looking into my problem but what you have suggested gives the name of the report when you open it after exporting it to excel.
My requirement is to have the current date appended to the report while exporting it. For eg:
When i click on export button i should get the name of my report as REPORT_07-16-2008.xls
Please tell me how to do this.
Thanks,
Deepti
April 28, 2020 at 11:56 am
did you get a response for this? looking to get the same..
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply