I'm using a form that has a dropdown control. This dropdown control has items that can be selected that serves as a filter for displaying results on the page that is returned from a stored procedure call. I'm having trouble finding a way to execute the stored procedure to display the filtered results everytime a different item in the dropdown gets selected. Currently, the form does get submitted and the selected item does get saved, but the stored procedure never gets executed on a postback. Any ideas on resolving this issure? Your help is much appreciated.
Hi, I have dropdown parameter with multi-values allowed. In my report headed I want to show all the dropdown values that were checked by the user to run the report. But since there could be a couple of hundred values I want to show ALL when all the values are selected instead of listing them one by one. How can I do that? Thanks,
Using SSRS 2008 r2...I have a report with a single-value parameter and three multi-value parameters, Class1, Name2 and Name3. I'm hoping for an explanation to one thing that I'm seeing and information on a second thing.
Class1 and Name2 both have the (Select All) parameter selected but Class1 is displaying the concatenated parameter variable list whereas Name2 is showing Null. Why is that? If anything, how can I get Class1 to be similar to Name2 and show Null?But my desired wish is to have Class1, Name2 and Name3 display the text"All Selected" when the parameter (Select All) is chosen.
I have created a Transactional Replication Publication on my SQL 2012 server.When I log into another server on the domain running 2008R2 and try to subscribe to the 2012 Publication, I get the following error when clicking on "Add SQL Server Subscriber": "The selected Subscriber does not satisfy the minimum version compatibility level of the selected publication"
The 2012 DB is set as 2008 Compatibility Mode?Am I not able to Publish from 2012 to 2008?.I was using SSMS 2008 to connect to my 2012 Instance, thats why it didn't work...
I have a dropdownlist that is populated with an sqldatasource as follows:
SELECT [Project_ID], [Title] FROM [Projects] WHERE [Username] = @Username AND Hide ='false'
The Datavalue vield of the DDL is populated with the [Title].
When the user submits the form [including the value of the of the drop down list] i want to be able to add the Project ID and the Title Values into another database table.
Hi Folks, Trying to setup a Third dropdownlist now to feed from the selection of my second dropdownlist which feeds off my first dropdown if that makes sense Do i need to somehow put in some code to add the first and second dropdownlist values to make the third How do i add two Dropdownlists values to create the third? I'm new to all of this so please go easy. Much appreciated. Thanks, Sully
I have been attempting to populate a dropdown (combo) box from a SQL query (SQLConnector) in Web Matrix and I have so far been unsuccessful. I have been able to populate a DataGrid just fine from the query, so then I limited it down to one colum (so itd be in the dropdown box) and set all the properties I could find (DataSource, DataMember, DataTextField, DataValueField) (and in all possible combinations) for that dropdown box to the SQL stuff (SQLConnector for the DataSource and then used the dropdowns for the others), and nothing shows up in my dropdown box. How can I make this populate off of my SQL query properly?
Additionally I will need to do the same thing for a Checkbox List so if it is the same and you know how to do that and could let me know for that too that'd be great.
For a controlParameter in the ASP code, how do I retreive the selectedValue of the drop down list?Would this work? <asp:controlParameter Name="InvoiceNumber" Type="String" ControlID="ddAdSize.Value" />
Hi Often we come across a form with a dropdown list (populated from a lookup table) with "Other" option as well. When user selected "Other" option a textbox appears where he can specify new option(This option is not to be added to master lookup table).
What is the best way to store it in database? I have 2 columns (A and B). 'A' contains Lookup ID if some option other than "Other" is selected, else 'A' has NULL and 'B' field contains the text of Textbox.
But while reporting I face problems as in a report the selected option text (either 'A' or 'B') has to be shown under one column only but SELECT A,B results in 2 columns.
I am having the following issue with one of my reports using Reporting Services 2005. When you chose a value from dropdown list , the page reloads but the dropdown list does not keep the value selected. It always display the first item from the dropdown list.
Is it possible in SQL Reporting 2005 to have dropdown menu(eg..on mouseover list of static menu appears from which i can navigate to other rdl files while passing all parameters) ..
I was wondering how I use the 'data region' dropdown selection which is present when i click the properties of a cell in table1, it always appear to be blank.
I would like to know how this works as i feel it will be useful in specifying various data regions within a table, I cant seem to find any relevant information on it, can someone tell me how this works ?
I created a multivalue parameter in SSRS 2005 SP2, but the problem is that the width of the dropdown list is too small to fit my data (I'd like to avoid scrolling horizontally).
I've got two tables, the first is a list of locations and the second is where i would enter new information (ie name and chosen location). Could some help me straighten out my code so that when button is clicked name and either the location text box is stored or if the location text box is empty the chosen location from the drop down box is stored. Here is my code and thanks for the help.
<%@ Page Language="VB" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server">Protected Sub submit_Button_Click(ByVal sender As Object, ByVal e As System.EventArgs) Try 'declare a connection to database Dim sqlCn As New Data.SqlClient.SqlConnection("Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|Database.mdf;Integrated Security=True;User Instance=True") 'connection string for sql server 2005 'open connection sqlCn.Open() 'declare a command to fire against databaseDim sqlCmd As New Data.SqlClient.SqlCommand("Insert Into Locations (Locations) VALUES (@Locations)", sqlCn) Dim sqlCmd2 As New Data.SqlClient.SqlCommand("Insert Into Results (Results) VALUES (@Results)", sqlCn) 'add the parameters to sql commandsqlCmd.Parameters.Add(New Data.SqlClient.SqlParameter("@Locations", newlocation_TextBox.Text.Trim))sqlCmd2.Parameters.Add(New Data.SqlClient.SqlParameter("@Results", name_TextBox.Text.Trim))
'execute the command sqlCmd.ExecuteNonQuery()Catch ex As Exception 'error occured Response.Write(ex.Message) Exit Sub End TryEnd Sub </script><html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"><title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> Please choose a location <asp:DropDownList ID="locationDropDownList" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource1" DataTextField="Locations" DataValueField="Locations"> </asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DatabaseConnectionString %>" SelectCommand="SELECT DISTINCT [Locations] FROM [Locations] ORDER BY [Locations]"> </asp:SqlDataSource> ..or add a new one: <asp:TextBox ID="newlocation_TextBox" runat="server"></asp:TextBox> <br /> Enter your name: <asp:TextBox ID="name_TextBox" runat="server"></asp:TextBox> <br /> <asp:Button ID="submit_Button" runat="server" Text="Submit" OnClick="submit_Button_Click" /></div></form> </body> </html>
How can I populate options in a dropdown (combo?) box based on data pulled from a SQL database compared against certain paramaters (if it is not equal to x, equal to y, etc)?
I feel real bad asking this...but I have a state table...ordered by State ASC and it mixes US and Canada, of course. I want to set up a table and a stproc to produce a dropdownlist that looks like this (as I've seen in many websites' state tables):
United States -- Alabama Arizona ... Canada -- Alberta ...
...and so on, so that the country is listed as a heading with no state code value and the states each appear in asc order under the country heading. I don't know how to do this. Does anyone have a good example of how to do this?
Hi,I have table (tbl_a) that get it values form three Dropdown List and the PK of this table is FK in different table(tbl_b).Since tbl_a get its values from three Dropdown List the number of rows in this table is limited to the number of combinations the three Dropdown List is offer (in any case the number of raws in that table will be final).Assuming tbl_a and tbl_b are both empty. The problem is that if i want to insert row to tbl_b i have to check first if there is a row that holds the values (or combination of values) i am getting from the Dropdown List in tbl_a .Then, if such row is exist i have to get the PK of that raw and insert it to tbl_b (as FK),if such row does not exist, i have to insert it and then get the PK of this row and insert it to tbl_b (as FK). In the end, tbl_a will have all the combination the three Dropdown List can offer so checking if raw exist in this table will not be necessary. In my opinion this is not effective way to do that.Can someone offer me better way to do it? Thanks
I have a dropdown list that is populated by two columns in a database.select (firstname+surname) AS Fullname from table where id = 'id'; It works fine but i want to know how i would get a space between the firstname and the surname because at the moment all the values come back as JoeBloggs....without any spaces
Hi, I have table (tbl_a) that get it values form three Dropdown List and the PK of this table is FK in different table(tbl_b). Since tbl_a get its values from three Dropdown List the number of rows in this table is limited to the number of combinations the three Dropdown List is offer (in any case the number of raws in that table will be final). Assuming tbl_a and tbl_b are both empty.
The problem is that if i want to insert row to tbl_b i have to check first if there is a row that holds the values (or combination of values) i am getting from the Dropdown List in tbl_a . Then, if such row is exist i have to get the PK of that raw and insert it to tbl_b (as FK), if such row does not exist, i have to insert it and then get the PK of this row and insert it to tbl_b (as FK).
In the end, tbl_a will have all the combination the three Dropdown List can offer so checking if raw exist in this table will not be necessary.
In my opinion this is not effective way to do that. Can someone offer me better way to do it?
A couple of databases on one of our SQL Servers is missing in the dbdropdown in query analyzer.Does anyone know what I need to update to sync this with the actualdatabases?Thanks,Burt
Hi there, May be a kind of dumb question, but I have a multi-value parameter that I would like to give users the ability to select from in a SSRS 2005 Report and I was wondering if there was a way to adjust the width of the drop down so the user wouldn't have to scroll horizontally to see a full parameter item. It looks like it cuts off after about 30 characters.
Guys, In my report builder when I drag the SKU in the filter area, its doesnt give me the dropdown and show me the distinct values, it just gives me a text box and expects me to type in the SKU. I have other attributes whcih have the same property as SKU but they all work fine when I drag them into Filter area.
Is there a limitation in reporting svcs where if the Field has more than "n" number of distinct records it will not populate the dropdown, instead just present you with a text box?
My DataModel Table has around 110K records and roughly 7K distinct SKU's
I compared the SKU field to other fields in the Report Model Designer and also DataSource View and nothing seems to be out of normal to not show the dropdown with distinct values except for the # of distinct records.
I have a multivalued drop down menu that isn't wide enough to display the entire label. It only displays about half of the label. The text it is trying to display should look like "Global Zone 1 - Global Zone 2 - Global Zone 3 - Global Zone 4", and the only visible text is "Global Zone 1 - Global Zone2". It does have a scroll bar at the bottom, but it is ridiculous.
When I set it to not be multivalued, the drop down menu grows to the size of my label. The menu has plenty of space to grow, it is only taking up a very small amount of the screen.
I am building a report with several search parameters; three of which are dropdown boxes each populated by a data set. I wanted something more user-friendly than the default "(Null)" in the dropdown, so for each data set, it returns a result set UNIONed with " N/A" to show up first as the default.
For some reason, when the report loads, the first dropdown populates just fine and does indeed have the default value " N/A" but the other two dropdowns are grayed-out. Until you change the first dropdown (to anything, apparently it doesn't matter what you change it to) the other two stay grayed-out. When the first is changed, the other two are populated and default to the desired " N/A" default value.
Why would it do this, when it didn't do it before; i.e. when the default for all of them was simply null. The dropdowns are not dependent on each other; they don't depend on other parameters for their values. Any help would be appreciated.
I have a web form that needs to be bilingual. It contains several dropdown lists. The "text" and "value" for each item in the dropdown list is retrieved from a database. The logic reads the database and then populates the various dropdowns with logic such as:
dim newItem as new ListItem(textString, valueString)
theDropDown.items.add(newItem)
The problem that I am having occurs when the textString needs to contains special characters such as accented vowels or an "n" with a tilde. I have tried populating the database with HTML-formatted strings such as "Avión", hoping that this would display "Avion" with an accute accent over the "o". Unfortunately it displays "Avión".
How do I get dynamically-created dropdowns to display special characters? If the answer is to simply store the special characters directly in the database, then the question becomes how do I get the special characters into the database? I tried to figure out how to write a T-SQL command such as
update tablex set SpanishName = 'Avion' where id=999
but I can't figure out the syntax to insert an accented 'o' into the string.
I am getting the dropdown of the dimension folder twice, as i took printshot from client tool. In SSMS/bids also its showing this error. How to resolve it.
i have two columns in a "release" table that i concatenate on my aspx page into one value for my dropdown list. for example, my database columns might look likeMajor: 3 | 3 | 4 | 4 | 5Minor: 1 | 2 | 1 | 2 | 1and my drop down list text like3.1 | 3.2 | 4.1 | 4.2 | 5.1my question comes when trying to take the drop down list's selected value and splitting it back into two fields so that i can use it for another query. how can i split my "major" and "minor" version numbers back up so that i can run a query similar to:SELECT * FROM [Version] WHERE (([Major] = @Major) AND ([Minor] = @Minor))but only having the one parameter of: <asp:ControlParameter ControlID="ddlVersion" Name="Version" PropertyName="Text" Type="String" /> where the selected value has a string of "<major>.<minor>" (where the numbers are separated by a period)?
I have gridview bound with SqlDataSource control. One of the grid columns is a dropdown list which is populated programatically, (the gridview has template column with edittemplate field with dropdown list), dropdown Value contains of course collection of IDs.Please tell me how to declare UpdateCommand which will update the row with the dropdown list. The problem is with parameter regarding the column with dropdown list. When i declare this parameter and bind it to SelectedValue property of the dropdownlist from edittemplate tag - it doesnt work, because datasource control cannot see this dropdown list. So, how am i supposed to declare the ID of the row being updated in <updateParameters>? Thanks in advance!
How do i add two values of Dropdownlist 1 and 2 to create No.3 Is there an easy way through Visual Studio to do this than Realms of code that i have been reading online, Surely, there is some command that is like Select Distinct Name from Clients WHERE city=@city + country=@country Or is it not this easy?
I am trying to populate a dropdownlist from a sql data source in my codebehind using c#. I thought I had the code correct but I keep getting the following error and I am stuck: "Only assignment, call, increment, decrement, and new object expressions can be used as a statement" Here is the code:protected void populateOppNameList(){ SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);SqlCommand cmd = new SqlCommand("SELECT empname FROM opportunity WHERE (username = " + userName + ")", conn); SqlDataAdapter adapter = new SqlDataAdapter(cmd); try { conn.Open();DataSet ds = new DataSet();DropDownList ddl_OppNames = (DropDownList)FormView1.FindControl("dropdownlist1"); ddl_OppNames.DataSource = ds; ddl_OppNames.DataBind;}catch (Exception e) { } finally {if (conn != null) { conn.Close(); } }
Does anyone know how to control the width of the parameter dropdownlist? If you select "Multi-value" for the parameter (non-sp1 version) the parameter list is in a dropdownlist that is manageable in size. If you do not use the multi-value parameter, it looks like the width of the dropdownlist is determined by the width of the longest text of the returned parameters.
Is there any way to control the width of the dropdown?