We have an SSRS report that has been running perfectly at multiple sites for over a year. It calls a MySQL stored procedure and displays the results in a table. For one particular customer who just migrated to a new server, this report now only shows one row of the results. It's a row that's early in the results but not necessarily the first row (not sure that has any significance). Below are steps I have taken so far to troubleshoot.
I've confirmed the procedure should return hundreds of rows by capturing the SQL via the slow query log, and running it directly on MySQL. So I've ruled out the data, the procedure, and the connection to MySQL.
This report does have grouping which I thought may be an issue, so I created a new report that calls the same procedure without any grouping and I get the same results.
As far as we know all other customers are using SQL Server 2008 R2, or 2016. This customer is using 2014. We have confirmed this customer does have all the latest SQL Server updates.
We have many other reports built in a similar way that work for this customer
We tried replacing the report RDL with another copy thinking it was perhaps corrupt
There has been one thing I've found to get all rows to show up. If I hard-code all parameters in the dataset, all rows will show up in the table. If any parameters are passed in (it doesn't matter which ones, or how many), only one row of the results shows up.
Dataset text examples
Displays one row
Call sp_report(?,?)
Displays multiple rows
Call sp_report('A','B')
These examples both return the same number of rows from MySQL according to the slow query log, but SSRS displays a different number of rows.
Any ideas would be much appreciated. I've been researching online and conducting many tests to try and figure this one out.
Update 4/16/2019
It's been 4 months and we still have not found a resolution for this. Now some other customers are starting to report this same issues. It still works for most customers and most reports, but there are a few cases where this occurs.
Related
I'm working on several reports for SSRS written in MySQL via ODBC Adapter. For some reason, Stored Procedures only return a single row of data instead of an expected set of data.
Below is the same stored procedure when ran on an SQL Editor:
And below is the stored procedure's execution result when SSRS tries to run it (both on Query Designer and Report Viewer):
I have also set parameters properly as far as i can tell:
so i wasn't able to find an exact answer as to why this happens on SSRS with MySQL via ODBC. What i was able to find was a workaround:
by executing the command as an Expression rather than as a raw query via the Query Editor:
Now the only caveat for this is that the DataSet Fields wouldn't be automatically generated, and that you have to plot them all manually. A good workaround for this is to first run a blank/null query with only the column names (i.e.: SELECT NULL 'column_name_1', NULL 'column_name_2') then later change the query source to Expression. The good thing about using expression is that you only need minor knowledge about how it works and it reduces the confusion with ODBC '?' Parameters.
Cheers!
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.
I have developed a SSRS report in which I have user three different select queries to create three different report and not a single parameter is used in any of these queries, only select statement like
select col1,col2,col3 from table_name;
There is one main report using these three reports as sub-reports. When I run the main report in local machine or development environment, it's working/running fine. I'm getting output but on the server, the main report is throwing a error like OUT OF MEMORY AT LINE 5.
I have tried everything I know and searched on net also; didn't get any solution for this issue. Does anybody know how to resolve this problem?
I have a single shared dataset which calls a stored procedure. I have multiple tables which use the same dataset and has filters on the table itself to only include certain records.
Does the dataset get called for each table or does it only get called once?
The easiest thing to do is run the report and see what happens in the database. In this example I have used SQL Server Profiler to view the database activity. I have tested using a simple report run through Visual Studio.
Dataset:
Report with two tables, different filters, same Dataset:
Run the report:
Check what has been recorded in SQL Server Profiler:
You can see that the Dataset query has been run only once. So in this case we can say that referencing a Dataset multiple times will not cause it to be loaded multiple times.
With SSRS it's always risky to say this will always be the case in all scenarios, but based on this example it seems like a good bet.
I have an SSIS package set up to export data from a SQL Server 2008 R2 table to a MySQL version of that table. The package executes however, I am getting about 1% of the rows failing to be exported.
My source connection uses the SQL statement
SELECT * FROM Table1
all of the columns are integers. An example of a row which is exported successfully is
2169,2680, 3532,NULL, 2169
compared to a row which fails
2168,2679,3532,NULL, 2168
virtually nothing different that I can ascertain.
Notably, if I change the source query to only attempt the transfer of a single failing row - ie.
SELECT * FROM Table1 WHERE ID = 2168
then the record is exported fine - it is only when part of a select which returns multiple rows that it fails. The same rows fail the export each time. I have redirected error rows to a text file which displays a -1071610801 error for the failing rows. This would apparently translate to:-
DTS_E_ADODESTERRORUPDATEROW: "An error has occurred while sending this row to destination data source."
which doesn't really add a great deal to my understanding of the issue!
I am wondering if there is a locking issue or something preventing given rows from being fetched or inserted correctly but if anyone has any ideas or suggestions on what might be causing this or even better how to go about resolving it they would be greatly appreciated. I am currently at a total loss...
Try to setup longer timeout (1 day) ot the mysql (ADO.NET) destination.
Well after much head scratching and attempting every work around that I could come up with I have finally found a solution for this.
In the end I switched out the MySQL connector for a different driver produced by devArt -dotConnect for MySql and, with a few minor exceptions (which I think I can resolve) all of my data is now exporting without error.
The driver is a paid for product unfortunately but in the end I'd have taken out a new mortgage to see all those tasks go green!