Some columns in report are not showing data on SSRS server - reporting-services

Please Help
I'm using SQL Server 2008 R2 and SSRS to develop a report. I've created a stored procedure on the server and I am accessing it through the report. Within SSMS, the stored procedure runs and returns data just fine. Also, within Visual Studio I run the debug version of the report and it outputs data just fine.
The problem arises when I deploy the report and try to run it in the web portal. It runs without any errors and displays the report header, but there is no data in 2 columns out of 7 ! I've tried creating a new report accessing the same stored procedure and the same thing happens. What could cause this?

A few possibilities;
The SPROC does not returns this data now and the report is only working in design view because it is using cached data (you can verify this by deleting the .data files in the report file directory and seeing if it stops working in design view)
You have a Shared Datasource configured which points to a different server/database on the report server than it does in Visual Studio, in that other server/database the sproc doesn't have data for those columns

Related

SSRS Report runs slower in Preview Mode/Report Viewer

I am using Visual Studio 2019 and using Microsoft Reporting Services Projects Extension v2.6.7. The problem i am facing is i have a report that process about 60k records, the report is complex and has Groups, repeat headers, dataset filters and also VB Code.
The stored procedure used for this report runs in less than 10 seconds and when the report is deployed to Report Server the report completes rendering in less than 2 Mins. But when I run the same report using Visual Studio in preview or Run Mode (Report Viewer) the report runs for a whooping 17-20 mins. I have used SQL Profiler and see the Stored procedure execution time is almost same as the report execution time. The stored procedure is designed to handle parameter sniffing issue and I dont see any issue with the procedure.
From the report side, i have tried Keeptogether=false, Interactive size etc that could impact performance. They look fine.
I also tried to add WorkingSetMaximum to increase memory but still no luck. The client i am working with requires to have the RDLC File integrated in their app and will not want to deploy on Report Server for their own reason.
How can i make my report run faster in Visual Studio Preview Mode/Report Viewer (Run Mode) so that I can match the performance of the report with the performance i Get in Report Server.
Also if anyone could tell if there is a difference in how the report rendering works on Report Server vs Preview Mode.
Edit 1 - Report Server and the database is configured in my laptop and it is not having any different configuration.
Edit 2 - Another observation i have gathered by running SQL Profiler is that during Preview mode the connection is kept open and the data retrieval time justifies report run time. Both are same. But when i run the report through report manager from the same machine, procedure completes in seconds and even the report renders faster. And As i have mentioned above, i have taken care of parameter sniffing. I am now trying to understand if there is a difference in the way SSRS Engine treats report rending and data retrieval for Preview and when report is deployed to reporting service.
I came across this Q&A discussion in MSDN. I tried to replicate this and it gave me a fix by changing the trust level for CAS in config file. But still I have a question with regards to how Report Viewer in Visual Studio behaves. Is there any similar setting that we use in the application config that can be used to improve development and test performance in Visual Studio.
MSDN Blog
Use the existing framework but force the use of Legacy CAS [code access security] Security
In Winforms <NetFx40_LegacySecurityPolicy enabled="true" />
In ASP Net application <trust legacyCasModel="true" level="Full"/>

Confused about differences between SSRS in Visual Studio and Microsoft Report Builder

I have some questions regarding the differences between working on reports in Visual Studio (SSRS) and Microsoft Report Builder. When first starting up Report Builder, I connect to a report server, connect to a data source, and then add datasets. This is what the screen usually looks like below:
On visual studio, when starting a new reporting services project, I am not prompted to connect to a report server. I can navigate to the report file and open it to design the report, but cannot add any data. When adding a data source, I am prompted to select the type of data source (SQL Server, Report Server Model, etc) and I have tried to connect to the same data source I had connected to in Report Builder, but I cannot access the shared datasets. Here is the visual studio prompt below:
Why am I unable to connect to a report server in visual studio and pulled the shared datasets in that report server?
what you need to do in visual studio is to create a Shared Data Source first
Under your report project (right hand side) , right click on your Shared data Sources and create a new one
Once you have created and tested the connection here you can use this for new reports in this project.
When you create a report, under report data, right click Sata Sources -> Add new Data Source then give it a suitable name and then select "Use Shared Data Source Reference" and then select the Data Source you created in the previous step
Once you have done this, you can then create a Data Set using the Data Source created above. (Embedded in the report)
But if you want to use shared Data Set, then the Shared Dataset needs to have this data source assigned.
Hope that made sense.

SSRS reports based on Getdate() function

I developed a report using the getdaye() function in the query. The report runs fine on SQL management Studio.
I created a report using the SQL server data tool and the report is based on the query that I wrote in SQL studio. I have established a connection using the data source and am able to connect to the SQL database. When I run the report using the tool after a couple of days the report data is different from the data that I get when I run the query using SQL management studio. Obviously the Getdate() is not fetching the right date.
The report data maches only when I copy and paste the query in the SQL server data tool and then run the report.
Am I doing anything wrong or should I use create a parameter for the date and direct the default values = Now() on the sql server data tool.
Is there any other work around for this.
Hem
I guess that did not publish the report to a Report Server but repeat to preview the result in Visual Studio (SSDT). SSDT caches data to improve the experience in SSDT and retrieves data from the database only when needed. "Needed" means that you either change the query or choose different parameters. You could of course pass a parameter to the database server, but if you don't want that, you will have to clear the cache from time to time. Look into the folder where the report is saved and delete the *.data file with the same name as the report. You can make this task very easy by adding a menu command to the tools menu as described here.

Reporting services error trying to access a object that isn't called in the report

have a strange one. We are running Sql Server 11.0.3000. The report is giving an error
An error has occurred during report processing. (rsProcessingAborted)
Query execution failed for dataset 'Audit_Detail'. (rsErrorExecutingCommand)
Invalid object name 'dbAudit.tblRangeReport'.
The thing is, the report uses 3 stored procs to go after data in a database called dbSalarySurvey. The three sp's do not mention the dbAudit.tblRangeReport. There are no functions or views in the 3 sp's that access that table. Further more, if i run the report in VS 2012 the report runs. If i run profiler on the dbAudit table when VS runs the report, the report does not query the dbAudit table. Only when running the report from the web browser do i get this error. This more detailed version of the error come from running the report on the Sql Server REporting services computer.
I have tried restarting the reporting services service. We have also deleted this one report from the reporting services server and republished it. Have also tried to republish the dataset. Other reports in this project that use the datasource and the same tables run.
Anyway, was wondering if anyone had any sugguestions.
Thanks
shannon
It's fixed. it was a pebkak error in the stored proc. It's really strange though. Honest to goodness, the proc was running in my dev env but not when running from a browser. I had already checked profiler like was suggested below and done the xml scan too. In the end.. just missed it i guess.
You need to trace the SQL to determine.
Are you connecting to the right database?
Are the procs you expecting to see, the ones actually being run?
The procs you are running are correct?
Open SQL Server Profiler
Start New Trace
Click Event Selection, Select the following events
Click - Show All columns
Go into Column Filters
and filter on your DB, and possibly even your login name (the login name of the SSRS server)
Once you've done that, call your report and look to make sure all the procs are called that you expect. Track issues from there.

ReportViewer - Remote Mode Question

We're considering using the VS 2010 Microsoft Report Viewer in Remote mode. My question has to do with is where data retrieval takes place. Let me give an example. Say we have a report with two parameters. These parameters are then passed as stored procedure parameters when data is retrieved. So, my question is, when is the stored procedure called? Is it called from the SSRS 2008 server and then the data and report sent to the report viewer client or, is the stored procedure called from the report viewer client? Secondly, let's say the report is being displayed in the report viewer client, and the user changes the parameter values and refreshes the report. Is the stored proc called from the client or is the stored proc somehow called from the server?
In remote mode, all the report processing is carried out by the remote SSRS server - in your example, the stored procedure would be executed on the server and the report/data returned to the client.
If the parameters are changed and the report re-run in this scenario, a new report execution request is submitted from the client to the server, processed at the server and report/data returned to the client in the same way.