SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Report does not execute stored procedure


Report does not execute stored procedure

Author
Message
den.j.stevens
den.j.stevens
SSC Veteran
SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)

Group: General Forum Members
Points: 213 Visits: 32

I deployed several reports to a new installation of SSRS and all reports execute a stored procedure.

All the reports work fine except for one. It's not executing the stored procedure. There's no 'No Data' message, just nothing. It works fine in Visual Studio connected to the same database and executing the same stored procedure.

To confirm, I have the stored procedures writing the parameters to a table, and this one report isn't writing anything to the table at all. I also have error written to the table in the BEGIN CATCH...END CATCH section, and nothing is there.

I also looked in ReportServer.dbo.ExecutionLog and there's nothing to suggest it even ran.

The stored procedure it runs has the same permissions as the other reports that are running fine.

All the reports have cascading parameters and these work fine on all reports except this one.

The only thing that works is the drop down menu, which are query-driven. So those are working, so it's like it sort of connects with the database.

I cannot figure out why one report doesn't run the stored procedure. Any ideas?


den.j.stevens
den.j.stevens
SSC Veteran
SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)

Group: General Forum Members
Points: 213 Visits: 32
The report is also deployed to a dev server where it works fine - it is firing the stored procedure on the dev server as well.
Is there some setting on the test server that would keep it from running a stored procedure?
Sue_H
Sue_H
SSC Guru
SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)

Group: General Forum Members
Points: 59437 Visits: 12859
den.j.stevens - Wednesday, November 1, 2017 10:32 AM

I deployed several reports to a new installation of SSRS and all reports execute a stored procedure.

All the reports work fine except for one. It's not executing the stored procedure. There's no 'No Data' message, just nothing. It works fine in Visual Studio connected to the same database and executing the same stored procedure.

To confirm, I have the stored procedures writing the parameters to a table, and this one report isn't writing anything to the table at all. I also have error written to the table in the BEGIN CATCH...END CATCH section, and nothing is there.

I also looked in ReportServer.dbo.ExecutionLog and there's nothing to suggest it even ran.

The stored procedure it runs has the same permissions as the other reports that are running fine.

All the reports have cascading parameters and these work fine on all reports except this one.

The only thing that works is the drop down menu, which are query-driven. So those are working, so it's like it sort of connects with the database.

I cannot figure out why one report doesn't run the stored procedure. Any ideas?



The execution log isn't likely to tell you anything in this case. You probably want to start by checking the Reporting Services log file. Check for the log file on the server in:
Program Files\Microsoft SQL Server\MSRS<YourVersionAndInstance>\Reporting Services\LogFiles

Sue



Thom A
Thom A
SSC Guru
SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)

Group: General Forum Members
Points: 71264 Visits: 18553
It might also be worth seeing what the SQL that the report is actually running is. Use Extended Events to capture the SQL and run it yourself and see if you get the same result (no data), or maybe you'll notice it's running SQL that you weren't expecting.


Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does :-P

Please always remember to encapsulate your code in IFCode Markup. For example [code=sql] [/code].
Click here to read Jeffs Guide on how to post SQL questions, and get swift and helpful answers from the community
den.j.stevens
den.j.stevens
SSC Veteran
SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)

Group: General Forum Members
Points: 213 Visits: 32

Got the log files - I see this in several places. I don't know what it means, but it seems to correspond with every time I tried to run the report.

ui!ReportManager_0-5!2764!11/01/2017-09:33:37:: e ERROR: HTTP status code --> 500
-------Details--------
System.Web.HttpException: The URL-encoded form data is not valid. ---> System.InvalidOperationException: Operation is not valid due to the current state of the object.

at System.Web.HttpValueCollection.ThrowIfMaxHttpCollectionKeysExceeded()

at System.Web.HttpValueCollection.FillFromEncodedBytes(Byte[] bytes, Encoding encoding)

at System.Web.HttpRequest.FillInFormCollection()

--- End of inner exception stack trace ---

at System.Web.HttpRequest.FillInFormCollection()

at System.Web.HttpRequest.get_Form()

at System.Web.HttpRequest.get_HasForm()

at System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull)

at System.Web.UI.Page.DeterminePostBackMode()

at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


den.j.stevens
den.j.stevens
SSC Veteran
SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)

Group: General Forum Members
Points: 213 Visits: 32
A-ha. I googled ThrowIfMaxHttpCollectionKeysExceeded() and saw what some others have found. I have parameters which - if the user 'selects all' - results in lots of parameters. When I re-ran by deselecting the 'select all' the report runs fine.
Thom A
Thom A
SSC Guru
SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)SSC Guru (71K reputation)

Group: General Forum Members
Points: 71264 Visits: 18553
den.j.stevens - Wednesday, November 1, 2017 11:37 AM
A-ha. I googled ThrowIfMaxHttpCollectionKeysExceeded() and saw what some others have found. I have parameters which - if the user 'selects all' - results in lots of parameters. When I re-ran by deselecting the 'select all' the report runs fine.


But that doesn't really fix the problem, as other users could still select 'select all'. Sounds like you haven't set up your SP to accept multi-value parameters, or the report shouldn't be set up to permit them


Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does :-P

Please always remember to encapsulate your code in IFCode Markup. For example [code=sql] [/code].
Click here to read Jeffs Guide on how to post SQL questions, and get swift and helpful answers from the community
den.j.stevens
den.j.stevens
SSC Veteran
SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)SSC Veteran (213 reputation)

Group: General Forum Members
Points: 213 Visits: 32
No, it doesn't fix the problem, but at least I know what's causing the problem!
Yes, my sp does accept multi-value parameters. The SP isn't getting run.

I found some work arounds by googling the 'ThrowIfMaxHttpCollectionKeysExceeded()' message. I am looking into which will work best for this situation.
Sue_H
Sue_H
SSC Guru
SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)

Group: General Forum Members
Points: 59437 Visits: 12859
den.j.stevens - Wednesday, November 1, 2017 1:09 PM
No, it doesn't fix the problem, but at least I know what's causing the problem!
Yes, my sp does accept multi-value parameters. The SP isn't getting run.

I found some work arounds by googling the 'ThrowIfMaxHttpCollectionKeysExceeded()' message. I am looking into which will work best for this situation.


Most of them I saw were fixed after adding the MaxHttpCollectionKeys values (greater than the default 1000) to the SSRS web.config file.
Not sure if you ran across that one yet but I think it's worth a try.

Sue



Sue_H
Sue_H
SSC Guru
SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)SSC Guru (59K reputation)

Group: General Forum Members
Points: 59437 Visits: 12859


Check these links:
Reporting Services: Your Report doesn’t show up (only a blank page)?
SSRS webpage error status code 500
SSRS Report Content Blank

Sue



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search