Home Dashboard Directory Help
Search

SSRS should vary the export filename or allow it to be set at runtime by Stoonad


Status: 

Closed
 as By Design Help for as By Design


8
1
Sign in
to vote
Type: Suggestion
ID: 679029
Opened: 7/11/2011 5:38:19 AM
Access Restriction: Public
0
Workaround(s)
view

Description

When viewing a SSRS report using the HTML viewer from the SSRS Report Manager, users try to do the following:

- View a report

- Export it to Excel, which opens Excel and loads the file. This exports it as "Report.xls", where "Report" is the name of the .rdl file

- Click back to the HTML report viewer

- Change a parameter on the report and click View Report

- Export it to Excel with the new parameter (with the previous report still open in Excel, in order to do analysis/comparisons)

- SSRS tries to export it again as "Report.xls"

- Excel reports an error because a file with the same name is already open:

"A document with the name 'Report(1).xls' is already open. You cannot open two documents with the same name, even if the documents are in different folders. To open the second document, either close the document that's currently open, or rename one of the documents."

At this point, with Excel 2010 is often locked up - you cannot even dismiss the error message with the "OK" button. You have to kill Excel with Task Manager (Excel 2007 does not lock up, but you still cannot load the two files).
Details
Sign in to post a comment.
Posted by Stoonad on 8/31/2011 at 6:29 AM
The Excel crash is really just an annoying side effect of the problem. We have found that sometimes it hangs, and sometimes not - it appears to be time dependent. If you wait long enough before running the next report, it won't hang.

The real crux of the issue is the ability to export multiple iterations of the same report to Excel, without closing (or saving) between each run. Users want to be able to do data analysis in Excel by varying parameters in the report.

We absolutely can consistently reproduce this behavior.

- Create a SSRS report with one or more parameters (actually, you don't really need parameters...)

- View the report via the Report Manager

- Export to Excel and have it open Excel to view the exported data

- Click back into the report viewer window (leaving Excel open)

- Change a parameter and click View Report

- Export the new data to Excel

It will not open the second iteration of the report because of the conflicting filename.

If SSRS would introduce some sequential, timestamp, or random value into the filename, that would allow this to work. An alternative (or in addition to this) option would be to allow the export filename to be set at runtime via an expression and we could build the filename based on parameter values/datetime functions.

Thanks!
Posted by Microsoft on 8/30/2011 at 5:21 PM
Hi Stoonad,

I appreciate your feedback.

We cannot reproduce a crash with either version of Excel. Do you have all the latest patches for Excel installed? Also, can you reproduce without RS by opening the file twice? If so, the bug would be with Excel handling the file format.

Also, you can open the same report many times and not get the name conflict. You need to save to a new name first. This is also common behavior for Excel when working with the same file name.

The workaround provided is for customers who want to customize their site. Your suggested improvement is appreciated and if we make changes to Report Manager, this would be a consideration.
Posted by Stoonad on 8/9/2011 at 4:47 AM
Thanks, but that doesn't really help.

I was not suggesting this as a "customization", but suggesting it as an improvement, or actually a fix, to a deficiency in the out-of-the-box Report Manager. I would have thought you guys would not want it crashing Excel 2010.

I guess if that's not a big deal to you, you can continue allowing it to crash Excel.
Posted by Microsoft on 8/8/2011 at 1:53 PM
Thank you for the feedback; Report Manager comes with default application that ships with reporting services and it is not customized by itself; for the required customization you can use report Viewer control that shipped with Visual Studio.

Regards,
Tamar Tzruya
SQL Server Reporting Services
Sign in to post a workaround.