SSRS report export error - reporting-services

I have a SSRS report which pulls data from a stored procedure. The report works perfectly fine on the web when im running it with different parameters. However, I get a duplicate row when im trying to export the ssrs report to excel.

The actual reason why the row was duplicating was because of the stored procedure. Instead of distincting the selected values it was picking up duplicates.
Select DISTINCT
There fore using a simple sql fixed it.

Related

SSRS report not returning all records while running from rdl

I am developing a SSRS report using ReportBuilder2012 v3. I have a stored proc which is based on a dynamic sql and has 10 parameters. All my datasets are pulling data from the stored proc. When I execute the stored proc in ssms I get the desired no of records say 60 . But when I run it from rdl i will only 40 records on one page and 20 records missing from rdl. I have gone through lot of posts on this and have tried setting the DisplayElementOutput to "Output" for each textbox from "Auto" still no luck. It's a simple report without any table groupings. I created a new report from scratch but still no luck. I am stuck with it since yesterday and couldn't figure out why is this happening.
Any pointers would be really helpful.
Thanks,
It appears to be that I was using some kind of filter in one of my data set queries and it was restricting the results to be 39. I removed that and now it shows exactly 60 records.

SSRS won't read my SQL query parameters

I'm trying to plot data to a shapefile in SSRS. I linked my SQL Server successfully and selected my Stored Procedure, but when I go to set my Spatial and Analytical Dataset Fields SSRS tells my
Procedure or function 'uspStoredProcedure' expects parameter '#eventId', which was not supplied.
I don't understand because I explicitly entered eventId on the page directly before this, ran the query and everything came up just as expected.

Taking snapshots of reports

I've created a snapshot of my report in order to improve the performance. However, it appears that it's only using the snapshot on the default values for the report. If I change the values, it appears that it's calling the procedure again (?) or rendering the report again.
The report has a dataset which calls a procedure (no input parameters), which can be filtered using the input parameters.
The snapshot has been created using the Snapshot Options and Processing Options. Any ideas what I need to do in order for the report to use the snapshot all the time?
That is basically how snapshots work - they are a point-in-time copy of the report results taken with the default parameter values. If you change the parameters on the report then SSRS will not use the snapshot because the report results could be different.
It sounds like your report is always returning all data from the procedure, which is then filtered at report rendering time based on the parameter values. This is not a good design and is probably the reason for your report performance problems. Try modifying the procedure to accept parameters and passing these from the report - this way the procedure only returns as much data as is necessary to display in the report and the report server does not have to do filtering when rendering the report.

SSRS: Using temp tables in the SSRS report query

I have an SSRS query that uses temp table and a select statement that returns output , when i try to modify the query and refresh the fields in the Dataset properties window i get following error
"Could not update the list of fields for the query.Verify that you cannot connect to Datasurce and that your query syntax is correct". I am able to connect to datasource and I was able t execute query in sql server management studio . I could see all the fields of report are appearing , but unable to refresh.
My question is can we use temp tables in report query (where Query Type : text) in Dataset properties Window ? Will it work
I was also able to build report successfully this means my fields are refreshed ?
I think the error you're seeing is because SSRS is trying to determine the shape of the query output without running the query, which means the temp table doesn't exist. You might try previewing the query in SSRS and then see if you can update the fields list.

SSRS - MultiValue Parameter "Select All" Problems

I am using SSRS 2008.
I have a multivalue, text, not blank parameter named personID. This parameter's available values are set to a dataset (let's call this dataset PersonQuery), which is tied to a stored procedure. This parameter's default values are also set to PersonQuery. This was working perfectly where when the page/report loaded all possible values for personID were selected.... then I must have changed something (however, I don't remember changing anything..?) because now it is broken... Everything is still fine locally but not once it's on the server.
When I first noticed it was broken only one of the available values was selected. So, I decided to try putting ltrim(rtrim(value)) in my stored procedure without changing any names or aliases.... and updated/refreshed the fields in the dataset to be safe and re-deployed the report to the server. Now, no default values are selected for this parameter when the page loads.
Can anyone suggest anything to try or has any idea about what's going on here??
A quick fix might be to delete the server version of the report and redeploy/upload your .rdl as a new report. SSRS keeps some of the meta-data about reports when a new definition is uploaded to replace an existing report. This includes some attributes of the parameters. This metadata is removed when a report is deleted from the server.
If you delete the server version of the report, you will lose subscriptions, and may need to reconnect the datasource, but if the report is working locally, then I think this will fix the problem.