Setting the number of copies before overwrite on subscribed reports? - reporting-services

We are using Microsoft reporting services in order to generate reports for our customers.
Today we are using the "overwrite" option when writing reports to a file share, one of our customers has now asked if would be possible to keep the last 7 copies of the rendered PDF, instead of replacing the old one each time a new report is generated.
I have looked inside the site settings for subscriptions, and can only find how to limit the number of snapshots, can this setting be used in the described scenario?
My question is: Is this possible to do with settings inside Reporting Services or do we need to use the "increment file names as newer versions are added" and then write some script that removes the old files?
Thanks!

You do not want to use snapshots, as this will require the users to go onto SSRS reporting site. If you want to keep the PDF's on a file share you would do exactly as you suggested:
The the Windows File Share subscription settings select the Increment file names as newer versions are added option.
Run a separate script to select all the files, sort them by date, and remove all but the first 7.

Related

Access 2013 locking other users out when linked to a Sharepoint list

I have an Access 2013 database that is stored on a remote computer. I do not have it set in a back-end/front-end setup. I have a SharePoint 2010 list linked to it as a linked table. I have 2 users that need to have access to the database at all times, others may need in it at a later date. When I link the table, only 1 user can be in the database at a time. Prior to adding the linked table, all users were able to use the database simultaneously. Now, after the first person gets into the database, subsequent users get the message:
The database has been placed in a state by user 'Admin' on machine '[computername]' that prevents it from being opened or locked.
For testing purposes, I tried creating a blank database that is connecting to that same table and tried to open it from another computer. I received the same error and all that is in there are the 3 tables needed for the SharePoint list.
Is there anything I can do to be able to have multiple users in my database again? I have full control to make changes as needed to the database, but I have no access to be able to change anything server side on SharePoint.
This is because of the 2010 SharePoint caching format.
You can avoid this behavior by going to Options -> Current database -> Caching Web Service and SharePoint tables, and untick Use the cache format that's compatible with Access 2010 or later.
Note that the different cache formats come with different features. The old (XML-based) cache format supports multiple users, the new (table-based) one doesn't. The old cache format can be taken offline manually and needs to be synchronized manually if offline, the new one automatically goes offline if SharePoint is unavailable and synchronizes automatically as soon as SharePoint becomes available. The new one supports adding fields in table view, the old one doesn't.
Through VBA you can mix caching formats for different lists, but that's generally not recommended.

automate SSRS access

I have inherited an SSRS environment which is a mess; Folders named only with numbers, hundreds of reports not accessed in the last 2 months (I checked ExecutionLog), etc..
I wanted to achieve two things…
Because every other day someone asks for read access to random reports, is there any way of making it “public”, meaning anyone can read and open ANY report?
I want to revoke “folder/report creation/move” access to everyone; can it be done without going folder by folder?
Related to it, the other day I found another SSRS box, that had this access?! What is that “everyone” is it a group inside my domain, or is it an SSRS feature that you can make it public so anyone can access?
That Everyone group looks like a domain account that your organisation has created. At least, I have never come across it.
To grant access to everyone that has a windows login, you can use NT AUTHORITY\Authenticated Users and set their permission to just Browser which will prevent creation or modification of Folders or Reports.
Regarding removing permissions from your items, your options are to either go item by item or bulk update the ReportServer database, which is not supported by Microsoft. You break something, you're one your own.
A big thing you will need to watch out for with opening up every report to every user is whether or not there is any confidential or sensitive information in any of the reports. Your organisation will not want low level staff looking at executive, cross company summaries nor will HR want their reports visible to anyone other than themselves.
You can export ALL permissions from SSRS using PowerShell.
I've also detailed a script that allows you to revert every folder to "inherit parent security" so you can control every folder by simply setting the home folder security. Sorry for the shameless plug but I blogged about both in April on SQLShack actually Managing SSRS Security using PowerShell
Both scripts are in that post. I hope that helps

Is it possible to run all the reports in a given folder from report server?

I have a folder with around 15 reports in it, these are Report Server reports. To run each report individually will take a while, so I want them to run together. So, what I want to be able to do is somehow run all the reports in this folder, is this possible?
This is somewhat of an ambiguous question. Let me explain. What are you asking specifically?
Q: Can you run multiple reports at the same time?
A: Yes, and there are several ways to accomplish this.
1. You can use SQL agents
2. Use batch files with task scheduler
3. Use an SSIS package and use an agent to run them at specific times...etc...
Hopefully one of the reports does not depend on another and another thing that you have to take in to consideration is how hard you will be hitting the SSRS or SQL server. Running them all at one time may take longer than one at a time. depending on the bandwidth of the SQL Server and what tables are going to be locked up during each of these processes.
You might want to give a little more detail in your question...
I would recommend an SSIS package, especially as it also one of the options presented by #Michael that can email the Excel workbook too which you mentioned in an earlier comment.
The following resource covers quite well the execution and export of an SSRS report using SSIS, including code you will need as a starting point: Executing an SSRS Report from an SSIS Package.
You could save some time in coding the solution by using the following custom Task that can be integrated into SSIS: SSIS ReportGenerator Task.
There is one problem in your requirements though which is merging reports into one Excel workbook where I assume you want separate sheets for each report within the same workbook?
Reporting Services can use multiple worksheets (to divide a report up into pages a.k.a pagination) but only for a single report; it can't merge reports into one Excel file. This can be accomplished with custom code however. There's a somewhat basic example here: Merging workbooks into a master workbook with separate sheet for each file.
One way to run all the reports at once is to add subscription to all of them and set same subscription start time in all of the reports. what will happen is once the start time arrived all the reports will run simultaneously and will generate excel/pdf (any format specified) file at shared location.

can you restore a single report in SQL Server 2012 ReportServer?

Basically, I am an intern and there is a report server which we are looking at increasing the power of a certain user on so he can edit more reports than just the ones in his folder. We know how to do this fine but what I wanted to make sure was that if he messes one up we can easily restore that report. We are preforming regular backups and I know how to do a full recovery but I cannot find any information about restoring just a single report when needed.
Thanks for your help.
There are two options.
Edit the report in Visual Studio deploy it to the target server and save the .rdl file in a source repository. You can deploy the saved version as many times as you need to.
Log into the reporting services manager and select the report and then select the export option. Save the .rdl file to source repository. You can upload the saved file to the server as many times as you need to.
Updated
Here is a link to a powershell script that seems to create a backup of all .rdl files and saves them to a folder.
Search for third party tools that will create and restore one or many individual reports.

SSRS Create development environment from Live server

I've inherited a live SSRS server and have been asked to amend a lot of reports that are on there.
Is there a quick way I can "export" all of the reports/data sources to a local instance so I can develop against it using BIDS?
e.g. Can I copy the ReportServer database from Production?
What else would I need to do?
I'd like to be able to have a Development copy of everything, with DataSources pointing to copies of the production databases but with the same names. Therefore I could re-write the report and re-define any SP's required locally, and then just deploy the new RDL to the server along with the ALTER SP scripts.
Is that possible or even sensible!?
Personally, with the volume you mentioned in the comments (30 RDL's and 3 databases) I wouldn't recommend some automated cloning of the entire Reporting setup from production to local. Instead, I'd suggest the following:
Reports
Go to the web front-end for your reportserver (typically http://yourserver/reports). Find each report, open it, and on the Properties tab click the Edit button. This button does not do what you might expect (edit the report inside the browser), but instead offers you a download of the RDL file. Save all the RDL files in one folder on disk.
With 30 reports manually downloading the reports may take you maybe an hour, max. This will probably beat most automated approaches. And since you should only need to do this step once...
Databases
It's not entirely clear from the question, but if you only have production databases and no DTAP setup yet, now may be a good time to start with that. You could host clones of the 3 production databases on a test server or possibly on your dev environment. Note that the schema's important here (should be the same as production), the data doesn't have to be entirely up to date.
Alternatively you can skip this bit and develop your reports against the production databases, assuming you can create connections from your dev machine to the production databases. Up to you.
Visual Studio / BIDS
This bit has a few parts to it:
Create a new reports project and solution in Visual Studio.
Add the existing RDL files you've downloaded earlier.
Depending on how the reports were set up, you may need to add shared data sources in your project, to get your reports up and running.
After all this, you should be able to preview your reports from Visual Studio (either with data coming from the "cloned" databases, or directly from production).
At this point you should also be able to safely make changes and preview/test them before deploying them.
Be sure to add the solution, reports, etc. to your version control system of choice.
Deployment
Once you've made changes you want to deploy to the reportserver, you have two basic options:
Deploy them using BIDS (see also the deployment properties MSDN page)
Go back to the web front-end, find the report, open the Properties tab again, click the Update button. This allows you to re-upload the RDL file with the changes you've made.
From now on you can just rinse and repeat on making updates and deploying the reports. No need for cloning/exporting the entire SSRS instance to keep things in sync.