How to solve SSRS timeout problem for heavy reports - reporting-services

I did my best to create huge report for someone who still likes to work with 200K rows Excel file rather then to get some useful summary. Report is pretty simple SQL-wise but because of load and probably rendering time it time out on the server. I don't have any option to change time out value on server.
What is good way to solve this task: i.e. to create 40mB Excel for user via subscription or posting.
All SQL performance attempts already exhausted. Should I move to SSIS which I think can handle such task.
I'm on SSRS 2016
Thanks
Mario

Related

SSRS Subscription strategies

I'm hoping someone with a little more experience than me will know a better way to schedule SSRS reports.
Here is my situation: I have a report on my SSRS report server which takes about a minute to run. I have about a dozen subscriptions setup on the report which cause it output into an excel file on a network drive every hour. About a dozen users check this file regularly, as it contains an queue of work that's come in from their helpdesk.
I believe the users are leaving the file open in Excel, because periodically the files starts locking and I get these errors:
Failure writing file : The process cannot access the file
'' because it is being used by another process.
Even though I've told them all to make copies of the file and only open it locally, they still are having trouble with this.
It seems like a natural way to use SSRS, but because of human tendencies, it is not really working. Is there a better way to do this?

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.

Moving SSRS Report with parameters to Dynamics CRM 2013

Good morning, All.
First let me start off by saying that I'm extremely new at CRM and even after reading umpteen million articles, whitepapers, and blog entries, I still feel completely lost.
I have an instance of Dynamics CRM 2013 On Premise that I'm trying to write custom reports for. Before I realized that all reports had to be done inside of BIDS, I wrote out a beautiful custom Quote inside of SSRS itself. I made sure to use the Filtered Views in my query to the database, and the structure of the query seems sound, but I can't seem to upload the .rdl file into CRM.
I get the error:
Reporting Error
Error occurred while setting the data source for the report
I have two questions:
How do I move this report into CRM without having to fully recreate it in BIDS?
How do I pass the Quote ID from CRM to this report query?
Thanks in advance for all of your help.
Edit: Added Error Message
You Should be able to upload the RDL directly to CRM...
Try creating a really basic report with the same data source and something along the lines of "select top 10 from filteredincident" and upload it.
If it works then you know it's something with your query.
CRM is notorious for giving error messages that don't have enough information, or are at worst misleading. I've seen this error when I accidentally used non filtered tables and a autofilter parameter that was incorrect.
Also take a look at the SSRS server that CRM talks to, if it's misconfigured that may cause an issue as well. You may want to try uploading your report to SSRS and run it from there to ensure that SSRS is working correctly.

SSRS and a report of 3,000,000 rows

I have SQL Server 2008 R2 with SSRS. I have created an SSRS report that may contain up to 3,000,000 rows.
When I tried to generate such huge report I saw the following picture:
The stored procedure (one that brings the data into the Report) worked 50 seconds
After this the SSRS ReportingServivesService.exe started to consume a lot of memory. It's Working Set grew up to 11 GB. It took 6 minutes; and then the report generation failed with the following error message:
An error has occurred during report processing. (rsProcessingAborted)
There is not enough space on the disk.
“There is not enough space on the disk.” – this was probably about the disk drive on that server where the Windows page file was mapped into. The drive had 14 GB of free space.
A NOTE: the report was not designed as a single-page report. It is divided on pages by 40 rows. When I try to generate the same report with 10,000 rows – it takes just 1 minute.
The question is: can this be fixed somehow?
SSRS is extremely ill-suited for this kind of scenario. Tools like BCP or SSIS seem much more suited to this task. The question you ask ("can my situation be fixed") is not quite answerable, apart from being answerable by you by demonstrating that it can be done.
In my experience though, I wouldn't think of trying to get 3 million rows to work in SSRS.
If you insist or are compelled to try anyways, here's a few things you can do to improve the situation:
Dive in to the rdl and remove everything you don't need: font instructions, dimensions, images, etc. Check regularly in the designer if the file is still valid. You could even consider rebuilding the report with as little extra features as possible.
Move any expression or dynamic ssrs bit to the query.
Remove all formatting and formats for cells.
Increase disk en memory space. If you are compelled to generate such big reports in SSRS you're gonna need it. Close any other application you can, your PC or Server's gonna need all the resources it can get for this. Normally I'd consider this a non option / as an indication you need different tooling though. But I'm beginning to sound like a broken record :)
Choose the export format wisely. Excel or PDF is gonna take many additional resources, e.g. CSV renderer will be much friendlier.

MS Reporting Services - Slow Reports

I created an annonymous SSRS web wrapper that had been working without error for several months. Recently we've had our year end release and the production version has had problems with, to my knowledge, one report. The Dev and Test environment produce the report without error it's just production where it has been failing. We've began to trouble shoot the problem with the following results:
The execution time for the stored procedure can at times be in seconds and other times in excess of 20 minutes.
The above is also true for rendering the report using report manager.
Once you get to the SSRS wrapper it completely fails. Even so considering there is a fluctuation in the amount of time the stored procedure executes it seems to me that even if I set the wrapper to not have a timeout the stored procedure may still be the culprit.
As for the report server, I'm not the DBA so I'm not familiar with the rs.config files. Also, I read something about the settings being set a certain way using IIS 6. According to the DBA it does not run off of IIS 6. Again, this is something I'm not familiar with.
Another thing I have a question about is parameter sniffing. There are three parameters being sent in, one for the City set as Text in RB 3.0 and Varchar in SQL, the month and year both set as int in RB 3.0 as well as integer in sql.
I know for a fact that the first time this error came about the server was reset and the report was produced without error. Since then they have been able to stabilize the server but now the report does not render. Anyone with trouble shooting advice please come to the rescue.
I have a negative one. Sorry about the bad question. Anyway, the problem was the stored procedure. The DBA told me he had to reset the statistics.