Is it possible to trigger a download of multiple files from a link in a SSRS 2008 R2 report?
So I've been googling my brains out and I can't find anything that works. This should be really simple. I'd be happy if I could even figure out how to trigger a download for a single file, but even that I can't find a solution for. Mostly I've been trying to use expressions to generate URLs that would trigger the download on click, but it always says Illegal characters in path, no matter what method I try. So the question is basically this: How do I trigger a download, meaning I click the link, I get prompted to save the file or files, not load the image or file in the browser. The files are mostly jpeg images but could be anything, pdfs, excel, etc.
August 27th, 2015 1:14pm

Hi TravWire,

Please check this link

http://weblogs.asp.net/srkirkland/exporting-a-sql-server-reporting-services-2005-report-directly-to-pdf-or-excel

Free Windows Admin Tool Kit Click here and download it now
August 27th, 2015 4:32pm

Hi TravWire,

Create a page to do the download like below: 

<html>
<head>
</head>
<body onLoad="window.location.href='myfile.zip';Javascript:window.close()">
</body>
</html>

After that, you call this external page by reporting services. The download will run automatically.

Best Regards.

August 27th, 2015 4:43pm

I'm already doing this. This was the only thing that worked. Problem is it wraps all the images or files into a PDF or Excel. I want individual files without having to run a report. Files in whatever format they are on the server... PDF, Word, Excel, Jpeg, etc. I'll take a single download on click but I'd prefer some type of zip wrapper or even just multiple file downloads on a single click.... thank you
Free Windows Admin Tool Kit Click here and download it now
August 27th, 2015 5:51pm

I have no idea how to do that. The server is constantly being updated with new files, so there'd have to be some type of automation creating all these pages to refer to. Then SSRS will need to know how to dynamically refer to them... I don't think this applies, sounded good though. All I really have to work with here is SSRS 2008 R2 sitting on SharePoint 2010, the database containing the links to all the images and files, and the Azure storage blob where they are actually stored... I've been able to generate a report that spits out a PDF or excel directly using SSRS Urls, but again it's wrapping them all in a file, which is better than nothing but not really what the client wants. So basically what is happening is the client runs a report, actually a subreport that shows a bunch of images and/or files. If they want to save them, they have to right-click Save As on each image (or file). There could be over a 100 in some cases, usually more like 5-30. So I can give them the PDF report output with all the files in one PDF or excel, but they really want all the individual files. If I can't give them a ZIP, I'd like to at least give them a single click download for each file instead of a righclick save as...

Appreciate the help...

August 27th, 2015 6:01pm

What if I use this as a Action URLor something like it?

="window.location.href='" + Fields!AttachmentStorageUrl.Value + "';Javascript:window.close()"

I've used this before in SQL javascript:void(window.open('URL','_blank')) and that works great

Free Windows Admin Tool Kit Click here and download it now
August 27th, 2015 6:23pm

Hi TravWire,

According to your description, you want to click an action to download all files(like images) used in a report instead of a report, right?

In your scenario, you can create a custom solution, add some code to retrieve those images used in the report via SSRS web service then add download action.

If you have any question, please feel free to ask.

Best regards,
Qiuyun Yu

August 28th, 2015 2:59am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics