Showing posts with label selection. Show all posts
Showing posts with label selection. Show all posts

Friday, February 24, 2012

Change SqlCommand Based On Combo Box Selection

I have a textbox, combo box, and a button on a form. I would like to perform a different query depending on the combo box selection. I thought I could do something such as:

if (cboSearch.Text =="Selection1") { scCmd ="SELECT * FROM tblTable WHERE txtSearch = @.Selection1"; }else if (cboSearch.Text =="Selection2") { scCmd ="SELECT * FROM tblTable WHERE txtSearch = @.Selection2"; }else { scCmd ="SELECT * FROM tblTable WHERE txtSearch = @.Selection3"; }
However, this obviously does not operate as I would need it to. What is the proper method for conditional SqlCommand statements like this?

You need to pass the value in as a Control Parameter.

http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.controlparameter.aspx

Friday, February 10, 2012

Change Look & Feel

Is there a way to change the look and feel of the reports in the bit where
the parameters selection is? And what about the top section?
Im thinking of changing background etc.
JonasChanging the style of HTML Viewer toolbar is not possible in the initial
release but it can be done in SP1. Details are in SP1 readme:
http://download.microsoft.com/download/7/f/b/7fb1a251-13ad-404c-a034-10d79ddaa510/SP1Readme_EN.htm
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jonas Larsen" <Jonas.Larsen@.Alcan.com> wrote in message
news:%23S6IjXmWEHA.2844@.TK2MSFTNGP12.phx.gbl...
> Is there a way to change the look and feel of the reports in the bit where
> the parameters selection is? And what about the top section?
> Im thinking of changing background etc.
> Jonas
>