SSRS - Report doesn't loads via Report Builder, while it does via SQL - sql

this is my first question here.
I struggled days and days trying to find a solution everywhere with no success.
Basically I have a standard stored procedure pulling out a report dataset in a few seconds (5-6 seconds).
It aggregates (GROUPING BY and SUMMING) 23000 rows.
Indeed, my final dataset comes out with 4 rows and 33 columns executing, as said, in 5-6 seconds.
Unfortunately, while trying to load it via ReportBuilder, it loads endlessly (querying SQL Server, the StoredProcedure remains stuck in a RUNNING status forever).
Everything on ReportBuilder (DB Accesses, Dataset, Parameters, Matrix....) is right configured: I was indeed able to load it until I added a few additional (4) fields.
The SQL dataset is basically something like:
PARAMETERS DECLARATION
SELECT
FIELDS
FROM
(SELECT
FIELD A
SUMS
FROM
TABLE
JOIN TABLES
WHERE
PARAMETERS MATCHING
GROUP BY A
) AS B
ORDER BY FIELD
An "external layer" SELECT was needed to make some calculations on some FIELDS, also in some cases using some PARAMETERS.
That's it.
I use to work with huge datasets, sometimes pulling out 30,000 rows with 110 fields, but if something loads via SQL it also does always via ReportBuilder: this is the very first time it behaves in this different way.
So I'm asking if there are some strange SSRS/ReportBuilder limitations I never faced in my experience.
Any help would be really really appreciated!
Thanks in advance to everyone who'll spend time :)

Related

SSRS Report won't compile if 20+ values selected in multi-valule parameter

I am working on an SQL report that uses a multi-value parameter that contains a total of 41 users. The report works fine if I select 1 or up to 19 total users, but breaks if 20 or more are selected from the list.
By break I mean it attempts to execute for 40+ minutes before I kill it). When running for 1 or for 19 users the report takes 1:10 to run.
I am using two datasets.
One - my main query in which the parameter is used.
Two - The second query to acquire the list of users for the SSRS parameter.
I use this method frequently with no issues for things like locations, insurances, etc.
The parameter is called in a WHERE statement like so: AND EventUserID IN (#user)
If I comment that line out and use: AND EventUserID IN ('KTR','GORCN',......) with the full list of usernames that were acquired with the same query that is being used in the second dataset it works fine and will return the full report.
I have tested it with different groups of users to make sure that one of the users weren't breaking it, but that didn't matter. I also should mention that the query for the second dataset is one I used from another report that uses it the same exact way. That report will run fine will all users selected (parameter properties are set the same).
I am working with MS SQL Server and MS Visual Studio. More details can be provided if necessary.
Thanks in advance for your time and assistance.
This looks like an issue I came across a while back. You essentially have a limited number of parameters you can pass back to SSRS.
Here's some similar issues:
https://blogs.msdn.com/b/johndesch/archive/2012/05/16/webpage-error-when-running-a-parameterized-report-with-parameters.aspx
You can increase this from the web.config file though
https://epmainc.com/blog/ssrs-reports-error-when-large-number-parameters-are-passed
Basically you want to add a section in your web.config file inside the <appsettings/> section:
add key="aspnet:MaxHttpCollectionKeys" value="9999"
That 9999 value should represent the number of parameters that you believe will be used.
If using SharePoint integration Mode: C:\inetpub\wwwroot\wss\VirtualDirectories\\web.config
If using SSRS native Mode: C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer.

Spotfire - Information Link - Filter Not Working

I am a beginner in Spotfire. I developed a simple information link.
Steps
I Created 2 tables by adding columns.
Then created Joins. 3 simple inner joins on the above table. The reason for 3 joins is it makes the query run faster than only 1 join.
Then created an information link by adding elements and joins.
This works perfectly well. The data is fetched properly. But as soon as I add filter, it stops working.
I tried
Creating Filter -> and then adding as element to the information link
Adding filter in the column filter itself: Column E_ID - Expression %1 = 1000
Editing the sql query in the information link. I added one more
clause in the where section: AND E1."E_ID" = 1000
None of these work. If I remove the filter, its working perfectly fine. The filter is on the same column on which on of the join is based.
Please suggest where I am making mistake.
Too long to comment...
So, I've noticed joins in the information designer can be cumbersome. It's convenient for people who don't have access to the data source, but if you do have access to the data source (as you do in this scenario), I would handle all of the logic on the DB server side. Thus, you are just supplying Spotfire with a flat file which it can easily ingest and create visualizations on. This will prevent Spotfire from bogging down with data transformations as well.
With that being said, I would also recommend using Stored procedures to serve up the data to Spotfire. Here are a couple of answers I posted on why which will make your life easier.
https://stackoverflow.com/a/38247931/6167855
https://stackoverflow.com/a/39640197/6167855
https://stackoverflow.com/a/43523380/6167855
https://stackoverflow.com/a/38247931/6167855

Why does SSRS taking too long to execute in design and more while building it?

I have two data-sets in my SSRS tool, first table contain 12,000 records and second one 26,000 records. And 40 columns in each table.
While building a report each time I go preview - it takes forever to display.
Is any way to do something to avoid that, so I can at least not spent so much time to build this report?
Thank you in advance.
Add a dummy parameter to limit your dataset. Or just change your select to select top 100 while building the report
#vercelli's answer is a good one. In addition you can change your cache options in the designer (for all resultsets including patramters) so that the queries are not rerun each time.
This is really useful plus - a couple of tips for you:
1. I don't recommend caching until you are happy with the your dataset results.
2. If you are using the cache and you want to do a quick refresh then the data is stored in a ".data" file in the same location as a your .rdl. You can delete this to query the database again if required.

Use domain of one table for criteria in another in ms Access query?

I am trying to create a report that displays 3 different numbers for each of my projects.
Contract Hours - Stored in projects table, 1 to 1 relationship
Worked Hours - Stored in linked table that will be updated using an external website reporting feature that will contain only data for the dates that are to be displayed in the report, one to many relationship needs to be a sum
Allocated Hours - Stored in a table in my database called allocations and contains data for all dates, one to many relationship needs to be summed.
Right now i have it set up in a way that the user has to type the data range for the report every time it is run, however the date range only actually applies to the Allocation data because the worked hours data comes filtered and the contract data is one to one.
What I would like to do is set up a query that can see the domain of the worked hours and apply it as a date criteria for the allocated hours.
I have attempted to use max and min values of the Worked hours and tried to get creative but I'm actually not even sure if this is possible because I cannot see any simple solution (although I know it should be possible and fairly simple)
Any help, suggestions, or recommendations are appreciated.

Business Objects (webi) stuck forever on retrieving data for specific dates

I am very new to BO webintelligence.
I am doing a very simple query, retrieve Sales Amount for dates between 2012 and 2013. Just for this simple query when I run it, my BO crashes or gets stuck on "please wait" window. Why is this happening? If I select like 3 or 4 days like between Jan 1st 2012 and Jan 4th 2012, it runs fine. Is there anything from my end that I am doing wrong? This is in production mode.
I also wanted to point out that I have tried limiting my data set for specific region etc.
Too many unknowns to successfully assist. I presume this is webi 3.1.x or 4.1.x and I presume that the Sales Amount is a measure and that your query includes a date which does not include a time component. If you only have these two objects in your results pane and have the region in your conditions then pulling something like [Date] and sum([Sales Amt]) should not take long to execute. As previous poster suggests, try to execute the sql in a tool like SQL*Developer or Management Studio or however the source database / OLAP is stored.
Even though you've limited the data to a "region" this may be too much data. Try selecting a smaller result set of 100 rows or changing the option for "retrieve duplicate rows" on the query panel.
If possible, post the query from your report using generic object names?