Paremeter: Set Default Values in Pull Down List
In my SSRS report, I have one of the parameter @Site ID in the report. The data type for Site ID is "String" in database. In report parameter properties, what data type should I select in order to make this @Site ID as a pull down list? In Default Value tab, I select get value from a query. However, I received an error. Please help Thanks, Josephine JT
October 9th, 2011 5:45pm

and what's the error?
Free Windows Admin Tool Kit Click here and download it now
October 9th, 2011 6:10pm

There is no data come out on the report after select the default value pull from the query. Was it becuase I chose the data type as "Integer" for this parameter @Site ID? Ideally, I would like to get a pull-down list with the default values from my query. Users can also select multiple values from the pull-down list at the same time. Is this feasible? Thanks, Josephine JT
October 9th, 2011 6:23pm

Hi Josephine, Any reason why you have specified the Type as Integer? What you are looking for is a very basic requirement and you should be able to accomplish it very easily. Please change the type to String and post the query you are using for the parameter query, if possible. Hope this helps!
Free Windows Admin Tool Kit Click here and download it now
October 9th, 2011 7:46pm

Hi Josephine, Generally, parameter are binded on eport with ID and Value..if you have SITEID interger and SITENAME as string then in availabe values put SITEID in value and SITEDATA in label and select datatype is int If you do not have int value put SITENAME at both places and select datatype as text. So based on this go to Default tab and set the VALUE filed.. Also, mark "Allow Multiple values" in General tab..- Chintak (My Blog)
October 9th, 2011 7:51pm

Hi Chintak, Thanks for your answer as the above. I tried to put Site Name (refer to my query, it is called Site Desciprtion) into my query this time. In General tab, I selected the "Integer" as a type for this @SiteID parameter. Please note that the selection of the type is either TEXT, Boolean, Date/Time, Integer, Float only. In Avaliable Value tab, I seleted "Get the value from a query". The Value field: I selet Site ID, the Label field: I select Site Description. (That is no datatype can be selected in Avalaible Value Tab. In Default Value tab, I selected "Get the value from a query". The Value field: I selected "Site Description". (There is no Label field avaiable in this tab). So I click Preview Tab to view my report data. However, there is no data come out. The error message said "The Report parameter @SiteID has a default value or a valid valud that depends on the report parameter "@SiteID". Forward Dependencies are not valid. Did I do something wrong? Please advise Thanks, Josephine JT
Free Windows Admin Tool Kit Click here and download it now
October 10th, 2011 12:32pm

Hi, The first thing is that, you need to set default value to SiteID in place of sire description.. Do you have any other parameters which are dependent on Siteid or site id is used?- Chintak (My Blog)
October 10th, 2011 2:12pm

I changed the default value to SiteID in place of site description. The outcome is the same. No data was displayed. I do have other parameters but they are just form start ship date and end ship date. ~JosephineJT
Free Windows Admin Tool Kit Click here and download it now
October 10th, 2011 2:15pm

As I said before, please post the query you are using for the parameter. It looks like you have dependencies.
October 10th, 2011 5:37pm

If I set @SiteID as parameter. Let's say I don't any dependecies. If users didn't enter any value into this text field @SiteID, can the report bypass this parameter. I want to have this parameter as an optional field. THanks, JosephineJT
Free Windows Admin Tool Kit Click here and download it now
October 10th, 2011 5:45pm

Hi Josephine, Do mean you want to specify the parameter as an optional parameter? If so, you can check the Allow blank value(“”) item or All null value item according to the data type of the parameter, which would enable the user bypass the parameter without entering value in the relevant textbox. Moreover, if you specify default value for the parameter, you must assure the data type of the default value is consistent with the parameter, any dependencies related to the parameter should be handled firstly( e.g.: you can specify the dependencies as cascading parameters if they need to interactive with users). I hope this can help you, if you have anything unclear, please feel free to let me know. Thanks, Bill Lu Please remember to mark the replies as answers if they help and unmark them if they provide no help.
October 11th, 2011 1:32am

Hi Bill, Yes, I want to put the parameter as an optional parameter. I did check the box "the Allow Blank Value" for this parameter. However, I skip enter the value, there is no data output come out. Not sure why. In my report, this is the only one parameter I setup. Please advise Thanks, JosephineJT
Free Windows Admin Tool Kit Click here and download it now
October 11th, 2011 12:16pm

Hi Josephine, Thanks for your feedback. Whenever you enable the parameter with blank value, you also need to adjust the relevant dataset or T-SQL query string (which refer to the parameter) to care about the blank value of the parameter, such as the T-SQL query string will not care about the parameter with non- value entered, please refer to the T-SQL query string below (Please enable the name parameter to allow blank value): select name,sex,grade from tbl where name like ‘%’+@name+’%’ Thanks, Bill Lu Please remember to mark the replies as answers if they help and unmark them if they provide no help.
October 11th, 2011 10:11pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics