I'm battling with a strange one. I've created a report using Visual Studio and deployed it successfully (so I thought). When I run it from within Visual Studio it displays data perfectly. But when I try and run it from online directly it allows me to select the parameters, it goes through the motions but returns no data. What could the issue be? I tried refreshing the fields in the Query Editor but this didn't work either.
Related
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"/>
I took over report creation/maintenance at a new job. We are using SQL Server 2012 and SSRS 2012. When I try to edit one of the older reports using Report Builder I find I can't even add a comment to some of the code in a dataset without breaking the report. This particular report has 14 parameters and all I have to do is try to add a comment line (never mind change the code) to a dataset and click OK to close the dataset edit it presents this DEFINE QUERY PARAMETERS prompt to verify the parameters. If you click OK then all the fields disappear from under the dataset in the Report Data window and the report doesn't work.
Running the report itself without trying to apply any edits still works fine, it's the editing that breaks it. I can edit other previous reports, it's just this particular report that's showing this behavior.
Finally figured it out after all this time. The SQL for this dataset has at least a dozen IF-THEN statements spread throughout the code, that keep checking for a certain input parameter that was selected. I finally simplified the previous report writer's code into one big IF-THEN-ELSE statement and now the dataset can be edited in Report Builder and Visual Studio with no problem. I'm guessing something changed in Microsoft's SSRS parsing routine between when this report was written in 2018 (where it had no problem with all those IF-THEN statements) and 2020, when the parsing failed but with no helpful error message.
In Microsoft Visual Studio when i run a Report using a Preview the data is showing and when the same report i run from server side its not showing the same data as per the Visual Studio Preview
please suggest
Visual Studio caches locally data in order to reduce the generation time for design puroposes, it will only update the data if you change the parameters values so if your report doesn't have any parameter you will get old data.
To refresh Visual Studio data preview the report and press the refresh button inside the generated report.
Let me know if this can help you.
I had a very similar problem. When I previewed on VS 2015, everything displayed perfect, but when I deployed to my server successfully, only one field wasn't showing up.
What ended up working was changing my report data sets from shared to embedded. Even though they were referencing the same query, somehow there was a disconnect when referencing the shared data set rather than embedding it directly in the report.
This is a very strange and perplexing problem I have never run across. I am working on an SSRS report that feeds off a database. I use an SSIS extraction package to append data to a table in said database. Everything seemed to work fine until the first time I updated the table. I can see the new data in SSMS, but the report looks like it is only seeing the data I had in there prior to the update. I've restarted Visual Studio, checked the connection string, and checked my dataset queries and I have no clue why the report is doing what it's doing.
If you are editing the report in Visual Studio, yes, it can be overly aggressive about caching the results of queries.
Look in the Solution folder (in file explorer, not Visual Studio) and look for a file with the name of the report, but .data appended, such as Report1.rdl.data.
Delete that file, which you can do while VS is running. Then preview the report again.
I'm at wits end trying to find a solution for my issues with Internet Explorer and SSRS. I have created an C# Windows Forms program that uses the WebBrowser element to display SSRS reports to the end user.
Currently there are two report options for them to choose from. One report opens and displays fine. The data set for this report takes about 2-3 seconds to retrieve. The second report is either timing out or not rendering as I get a blank screen.
I think it is timing out as opposed to not rendering because I can't even choose the export to file option. The data set for the second report only takes about 15 seconds to retrieve. I have tried altering timeouts on web.config and rsreportserver.config on the SQL Server and I have tried putting a <system.web> section into the app.config file of the ASP project, but none of that seems to have fixed the issue.
I also tried changing the sessionState value in the web.config but that doesn't seem to have done anything either. Has anyone encountered this error that can tell me what steps to take to fix the problem? My local machine is using IE9 and the server is running SQL Server 2008 R2 on Windows 7.
The answer to this is above in the comments to my question. Don't use the WebBrowser control as it is prone to the failure of IE. I placed the ReportViewer control on there and it works correctly. Check http://technet.microsoft.com/en-us/library/aa337089(v=sql.100).aspx for usage of this control.