Showing posts with label downlist. Show all posts
Showing posts with label downlist. Show all posts

Monday, March 26, 2012

Is it possible to have a List box or a combo box instead of a Drop downlist

Hi

Is it possible to have a list box or a combo box for selecting parameters instead of having a drop down list...

and If yes how can i do it?

Regards

Karen

Sure you can. Just drag a listbox control onto your page. Set the autopostback property to true if you want to allow postback and SelectionMode to Multiple if you want to allow more than one item to be selected. Then to access the items programmatically, you can do something like this.

Dim xAsString =String.Empty

For iAsInteger = 0To ListBox1.Items.Count - 1

If ListBox1.Items(i).Selected =TrueThen

x = x & ListBox1.Items(i).Text &","

EndIf

Next

|||

Thanks adyle,

it is possible to do this in the report manager??

Regards

Karen

|||

Hi Karen,

Can u tell me how to add a dropdown to my report ?

thanx

Magik

|||

Magic

do u wanna have a drop down list that has check boxes in it for multiple selections if so.. then

1) in your report parameter select the parameter that u want make as a dropdown and then select the multivalue check boxes...

2) if you want u can create a different dataset to popluate the drop down list and select query from the avaliable values.. and then select the dataset etc. and click ok.

3) in your stored procedure should like this...

Declare the @.Param as nvarchar(max)

@.sqltext nvarchar(max)

if the @.Param is NULL

Begin

select * from whatever and include the joins

Else

Begin

Select @.SqlText = 'Select * from tablename where Field or columnname in @.Param'

Exceute (@.sqltext)

End

Hope this helps,

Regards

Karen

sql

Is it possible to have a List box or a combo box instead of a Drop downlist

Hi

Is it possible to have a list box or a combo box for selecting parameters instead of having a drop down list...

and If yes how can i do it?

Regards

Karen

Where? No, in the Report Manager. Yes, in custom applications that use the report viewer controls.|||

using Report manager.. how can i use it in report viewer control... cause i am letting the users view the same reports using Report viewer.. can u please give me some links as to how to do it...

regards

Karen

|||

In the Report Viewer control you can hide the parameter area and replace it with your own. You may find the following article useful.

|||

Teo Lachev,

Thanks for ur answer... is it possible to do something like this in the stored procedure directly.. cause i am calling a stored procedure for that particular parameter and it list the all the plans in that drop down box...

My main Stored procedure to run the Report has 4 Parameter... and to populate one of the Parameters in the report i am using another sproc so that i can get all the plans... and if this is the case .... how do i get the values in a list...

Regards,

Karen

|||

So, once you decide to implement your own parameter area, it is up to you what controls to use or validation logic to implement to validate the parameter values. Essentially, you are building a custom WinForms or ASP.NET front end to handle parameters.

Is it possible to have a List box or a combo box instead of a Drop downlist

Hi

Is it possible to have a list box or a combo box for selecting parameters instead of having a drop down list...

and If yes how can i do it?

Regards

Karen

Where? No, in the Report Manager. Yes, in custom applications that use the report viewer controls.|||

using Report manager.. how can i use it in report viewer control... cause i am letting the users view the same reports using Report viewer.. can u please give me some links as to how to do it...

regards

Karen

|||

In the Report Viewer control you can hide the parameter area and replace it with your own. You may find the following article useful.

|||

Teo Lachev,

Thanks for ur answer... is it possible to do something like this in the stored procedure directly.. cause i am calling a stored procedure for that particular parameter and it list the all the plans in that drop down box...

My main Stored procedure to run the Report has 4 Parameter... and to populate one of the Parameters in the report i am using another sproc so that i can get all the plans... and if this is the case .... how do i get the values in a list...

Regards,

Karen

|||

So, once you decide to implement your own parameter area, it is up to you what controls to use or validation logic to implement to validate the parameter values. Essentially, you are building a custom WinForms or ASP.NET front end to handle parameters.