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 - 1If 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
No comments:
Post a Comment