Solved

Pass parameters to SSRS

Posted on 2014-02-27
20
944 Views
Last Modified: 2014-03-06
I have SSRS 2008 report, application pass parameters in URL (some State name) to SSRS report, the URL as below.  The report itself runs well,  but report cannot be displayed on server, error:

"Default value or value provided for the report parameter 'State' is not a valid value"

I found if I removed some States from URL, it would display report.  I.e., some states work, some states don't work.

http://servername/ReportServer?/ApplicationName/DepartmentStore&State=AL&State=AK&State=AR&State=CA&State=CO&State=CT&State=DE&State=DC&State=FL&State=GA&State=HI&State=FL&rc:Parameters=FALSE
0
Comment
Question by:5281
  • 12
  • 8
20 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39894458
Have you established which states are causing the problem? If you have, try just passing one of the problem states and see if it works.
0
 

Author Comment

by:5281
ID: 39894686
It doesn't work if I just pass one of the problem states.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39894755
An example problem state?
0
 

Author Comment

by:5281
ID: 39894772
0
 

Author Comment

by:5281
ID: 39894798
To me the problem states don't have anything in common.  I really have no idea what would be the problem.  I used the trim() function to trim the State string.  

I saw an Microsoft article, could it be something like that? https://support.microsoft.com/kb/970058#appliesto

But I don't know how to work around with this problem.  Please advise.
0
 

Author Comment

by:5281
ID: 39894852
I am thinking to pass parameters (those states) through the code, instead of URL.  Do yo have a sample code in VB.net.  Thanks.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39894954
0
 

Author Comment

by:5281
ID: 39895720
The SSRS report is in PDF format, the examples are passing parameters from ReportViewer Control to SSRS.  I don't think I have a ReportViewer control in the asp.net application.
0
 

Author Comment

by:5281
ID: 39895897
How to pass parameters from asp.net project to SSRS pdf format?  I think it is my question.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39895921
I think for server report, you may have to rely on URL to pass parameters. You can pass parameters to local report with the other method I linked above.
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

Author Comment

by:5281
ID: 39895952
If the only way to pass parameters for server report is through URL , I don't understand why I have the error message for some State, but not others.

"Default value or value provided for the report parameter 'State' is not a valid value"
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39896000
Is the parameter configured to be multivalue?
0
 

Author Comment

by:5281
ID: 39896011
There are two datasets, the report only use the first dataset, the parameter is set to "Allow multiple values", the parameter is set "Get values from a query" from the 2nd dataset.  Is that right?
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39896018
Parameter seems to be right but not sure about the 2nd dataset.
0
 

Author Comment

by:5281
ID: 39896028
The 2nd dataset is used for testing purpose, so the parameter dropdownbox on report can list items.
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 39896046
And that dataset contains all the states that you are passing?
0
 

Author Comment

by:5281
ID: 39896083
2nd dataset contains all the states I am passing.
0
 

Author Comment

by:5281
ID: 39896159
Should I remove 2nd dataset and test?
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39896511
Yeah worth a try.
0
 

Author Comment

by:5281
ID: 39910291
The problem is that there are some space after the name of State in database, so it doesn't match the URL.  I trimmed it in query.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now