.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Parameter values dependency on prior Parameter selection

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :


I need immediate help on the following Issue.

Based on Parameter value I need to hide value in Other Parameter.

To be more specific.,

I have three filters Operation, Region, District and Currency

When user chooses Operation and Region I need to show only USD Currency though Operation/Region might have both the USD and EUR.

When user chooses District, need to show corresponding currency. It should be either in USD or EUR. (Just like Cascading and this is working w

View Complete Post

More Related Resource Links

Get Submitted SQL with Parameter Values (Not @Names)



I want to retrieve the full SQL that my Web Application generates and executes on the database. So when the INSERTED or UPDATED events are triggered on the SqlDataSource, I want to get that particular SQL Statement.

The  problem I've got there though is when I use "e.Command.CommandText" that gets the SQL statement with the paramter names NOT the paramter values. I specifically need the values.

So... how can I get it to display the full SQL statement containing submitted values!?



SSRS Report Parameter Auto selection

HI All    I have a report paramater 'ParamBranches' which list all branches say aa,bb,cc etc ... and another report parameter is 'ParamBranchStartswith' So when i type in 'a' in Branh Starts with paramter -  the 2nd parameter that is ParamBranches will be filled with "select ",  "aa"   As there is only one Branch starts with 'a' ,  Is there any way to autoselect the Branch 'aa'  in Branches list , rather than user manually selects 'aa'       Regards Sooraj

problem with passing parameter values to stored proceedure from asp.net c#

hi all, i am facing a problem while passing parameters to a stored proceedure. following is my sql query written for creating this stored procedure:   CREATE proc [dbo].[getstudent]( @wherecolumn nvarchar(2000), @wherevalue nvarchar(2000)) asbegin  declare @sql nvarchar(max) set @sql = 'select * from student2 where ' + @wherecolumn+'='+@wherevalueexec sp_Executesql @sql end   my table contains four columns: And the sql Query For the table is as follows:   CREATE TABLE [dbo].[student2]( [name] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [rollno] [int] NOT NULL, [class] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [section] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, CONSTRAINT [PK_student2] PRIMARY KEY CLUSTERED ( [rollno] ASC)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]) ON [PRIMARY]   from page behind I am passing the values to parameter as follows:   SqlCommand command = new SqlCommand("getstudent", c.con); SqlDataAdapter datadapter = new SqlDataAdapter(c.cmd); command.CommandType = CommandType.StoredProcedure; command.Parameters.Add("@wherecolumn", SqlDbType.NVarChar).Value = "rollno"; command.Parameters.Add("@wherevalue", Sq

How to Create an MDX Query Parameter to Select 30 Values from a Dimension?

Hi, I'm using SSRS 2005 to report on an SSAS cube that contains a Procedure dimension.  I don't need to use members of this dimension in my report, but rather need to select records (patients) where their chart has one or more of the codes.  I've researched this today and cannot locate the best approach.  Thus far, I've attempted to create an MDX query parameter as part of my dataset.  However, I don't know whether this is the correct approach, and how to structure the syntax so that only records with one or more procedures are included in the report?  If so, what is the proper MDX syntax for setting my Procedure code equal to the query parameter? Thanks, Sid

Passing multi values to another multi value parameter

Hi, my requirement is as follows I have a parameter1 in which i populate values from database. the user can select multiple values from parameter1. after the parameter1 i have another parameter2 which is also mutliselection value. i,e depending on the selection of parameter i need to populate remaining values in Parameter2 (which is also a multi selection value). i have splited the values from parameter1 and passed the value of parameter1 (parameter1.value) to parameter2. but i am getting the following error An expression of non-boolean type specified in a context where condition is expected, near ',' incorrect syntax near the keyword 'ELSE' can anyone help me in this Thanks, Rajesh Peethala

SSRS problem with passing multiple parameter values via URL %2c

Hi, I have a problem with passing multiple parameter values from one report (A) to another report (B).   For example I built a URL string in report (A) with the parameters like &Parameter1=1&Parameter1=2. As soon as I click on that URL the URL parameters look like &Parameter1=1%2c2 and the parameters don’t getting populated on report (B).   If I change the parameter in the URL to &Parameter1=1&Parameter1=2 and execute the URL manual the parameter on report (B) getting populated properly.   Is there a way to disable the coding like %2c (comma) or is there another solution for it?   Thanks

Boolean Parameter to include null on selection on false

What i am trying to do is use a boolean parameter which when a user selects true only brings up true but when user selects false it brings up all nulls as well as false    Sample    Declare @Parameter1 boolean  Select  From example  Where field.1 = @Parameter1 (If parameter1 is false I want it to select all null fields as well as false)   Thanks   Michael 

Report Parameter Values - Can I use getdate() or now() or any other function?

Hi all,      I have a report that utilizes a calendar function but I need to make it a subscription report. Is it possible to use getdate() or now() on the Report Parameter Values? I have a text box that says Enter a Date and that is where I want to have the default value to be run with the subscription. Please let  me know if possible. Thank you.

Any way to pass Multiple Values for a single Label in the Parameter?

  I have a Report that Contains 2 Parameters, @Customer & @Area. When trying to set up the Available Values for @Area, I'm having issues using multiple values for one Label, i.e. = "4006" Or "4610" One of the Filters in the Report is an Operation number, which is the [OPERATION] field, which is setup as a filter on the Tablix referencing the @Area parameter.  PROBLEM: I cannot retrieve any data when trying to use the ‘Or’ Operator here. If I simply put “4006” or “4610” I retrieve data, but when trying to combine it returns no data. Example, I need to allow a user to select ‘Chassis Incoming’, which would include data from Operations 4006 & 4610. QUESTION: Any way to pass Multiple Values for a single Label in the Parameter? I realize the typical solution may be to use ‘Multi-Value’ selection, but in this case we want the User to select the Area and the multiple values for Filtering will be automatically determined for them. Otherwise, they are subject to not getting it correct. I have tried several different ways, such as =”4006” Or “4610”, =(“4006”, “4610”), = In(“4006”, “4610”), etc….   Note: We are using Report Builder 3.0  

Ignore a parameter values ??

Hello I will briefly describe my problem, I have a report as a matrix where the years are presented in columns and below these years we find months, the report accepts as parameter the year and month and other params, I'd like under the choice of an user to display either the years and months at a time or Only the years. I tried as a solution to add a new value = "Ignore months" to the parameter "month " but when i try to view the report, it does not display anything (because it filters month which = 'Ignore months ' and finds no result) So there is a way to ignore the month parameter values in this case??? Hope to get response as soon as possible.Thank you Regards Aya

Report parameter values must be specified before the report can be displayed. Choose parameter value


Helllo...I am getting error "Report parameter values must be specified before the report can be displayed. Choose parameter values in the parameters area and click the Apply button." when I deploy the report in the SharePoint. The report works fine in the when I run in BIDS. we have two parameter in this report...Parameter #1 is tied filterd based on the user who is accessing the report and Parameter #2 is dependent on the value selected in Parameter #1.

Please let me know what I am doing wrong here? Is there any workaround to get past this message?

Thanks for help.


Assign Query String Values to Selectcommand parameter in




I have two pages EventList.aspx and EventDetail.apsx. When user selects any events [basically list item] on EventList.aspx page [all events are rollup in single sote collection] in am redirected to EventDetail.aspx page with QueryString ListID and ListItemId.

On EventDetail.aspx page i am using


"<Webs Scope='SiteCollection'></Webs><Lists><List ID='{ListID}'></Li

Can the choices for one parameter depend on the selection of another one?


Hi there,

I have a report with two parameters: type (simple or complex) and country (can be any country (e.g. UK, US,..)). I am wondering if it is possible that a user can only select a country when they have chosen the type 'complex'. If they have chosen the type 'simple' the country box should be selectable (e.g. greyed out).

Thanks and best wishes


Label of parameter = values of 2 fields



I would like to create a parameter that has as value, the combination of 2 fields of my dataset.
Say like Name and FirstName combined as EmployeeName
There is no chance I can update/change the procedure that delivers these fields.

I tried looking into the code, but didn't have a lot of success.
Anyone some ideas?


sql profiler doesn't show mdx report parameter values


Hi All,

Is there any way that I can afterwards see the members selected as parametervalues in an SSRS report. 

Maybe I'm missing something, but to me its looks as if SQL Profiler is capturing the mdx dataset queries exactly as specified in the report definition, but SQL Profiler does not show the parameter values selected by the end-user.

For analysis puposes I need to figure out what parameter values have been selected by my end-users on report-execution.

Any suggestions/workaround for this ?

Kind regards,



Please remember to mark replies as answers or at least vote helpfull if they help and unmark them if they provide no help.

Multiple values in field as parameter


Hello, I want to use values from a field in a sql server table as paramters in my tsql query. The problem is that the data in the field is as follows:

1. There may be only one value, such as '6000'.

2. There may be more than one value, seperated by |, such as '6000'|'6001' This would mean all values that are equal to 6000 or 6001

3. There may be more than one value, seperated by .., such as '6000'..'7000' This would mean all values that are from 6000 through 7000

Any help is appreciated. Thank you.


SSRS URL Paramter Value does not match with report parameter Values



We have rdl report and passing a multiple paramter values through URL. When the passed values exists in report parameter values then report displayes properly.

But when we pass the values through URL which doesn't exists in report parameter value then it throws an error saying parameter value is missing.

The reports db and the application db through which we display the reports are different. how do we address this issue.

pls help.

regards, hari.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend