I want it to either display the label (All) or the name of the month. I get an error when All is the parameter selected but not when any month is selected. If I removed the MonthName() function, I don't get an error but I also don't get the month name.
Hello. I have a multi value parameter in my report. I want to know how can I display all of the selected values in this parameter in a text box. Whan I try to use this parameter in a textBox it automaticly take the value: Parameter.param.Value(0) Whice take only the first select value.
A SQL Server 2005 stored procedure expects a parameter UserID depending upon which it retrieves the no. of records & OrderIDs corresponding to the UserID from a DB table (note that OrderID & UserID are two of the columns in the DB table). So for e.g. consider a user whose UserID=6 & the DB table has 3 records where UserID=6. In other words, there are 3 OrderID records of the user whose UserID=6, say, OrderID=8, OrderID=17 & OrderID=29. The stored procedure will finally return 2 columns - the OrderCount (which is 3 for UserID=6) & the OrderID (which will be 8, 17 & 29 for UserID=6). This is the stored procedure:ALTER PROCEDURE dbo.OrderCount @UserID intASDECLARE @OrderCount intSET @OrderCount = (SELECT COUNT(OrderID) FROM NETOrders WHERE UserID= @UserID)SELECT @OrderCount AS OrderCount, OrderIDFROMNETOrdersWHEREUserID = @UserIDIn a VB class file, I am invoking the stored procedure in a function named GetOrderCount which returns a SqlDataReader back to the calling ASPX page. I want the ASPX page to display the 3 OrderIDs of UserID=6 in a Label control. Unlike the DataBinding controls like DataList, DataGrid, Repeater controls, the Label control will not automatically loop through the recordset. So I tried to accomplish this using a For....Next loopDim i As IntegerDim sqlReader As SqlDataReaderiUserID = Request.Cookies("UserID").Value'ShopCart is the name of the class in the VB class fileboShopCart = New ShopCartsqlReader = boShopCart.GetOrderCount(iUserID)While (sqlReader.Read) If (sqlReader.GetValue(0) > 1) Then pnlLinks.Visible = True For i = 1 To sqlReader.GetValue(0) lblLinks.Text = sqlReader.GetValue(1)(i) Next i Else pnlLinks.Visible = False End IfEnd WhileBut this generates the following error:No default member found for type 'Integer'.pointing to the linelblLinks.Text = sqlReader.GetValue(1)(i)in the above shown ASPX code. Can someone please correct me & suggest how do I loop through the recordset so that I can display the records in a Label control?
Below is code for inserting data into the database that I know works, so I thought if I replace "Insert" with "Select" I could retrieve a specific row from my database and present it in a label or text box but nothing happened. How can I retrieve a row or rows from a database using vb code and display it in a textbox? I'm using visual web developer 2008 which is similar to 2005. Thank you.
Dim UserDatasource As New SqlDataSourceUserDatasource.ConnectionString = ConfigurationManager.ConnectionStrings("ASPNETDBConnectionString1").ToString()
UserDatasource.InsertParameters.Add("username", Context.User.Identity.Name) UserDatasource.InsertParameters.Add("comments", txtSearch.Text)UserDatasource.InsertParameters.Add("points", points) UserDatasource.InsertParameters.Add("ipaddress", Request.UserHostAddress)UserDatasource.InsertParameters.Add("datatimestamp", DateTime.Now()) Dim rowaffected As Integer = 0
Try rowaffected = UserDatasource.Insert()MsgBox("Thanks for the post", MsgBoxStyle.OkOnly, "Post Executed") txtSearch.Text = ""Catch ex As Exception MsgBox("Please sign in or sign up to post comment", MsgBoxStyle.OkOnly, "Login Error") End Try
Hi,What's the 'new' declarative way to fetch one field from a SQL table and display the result in a Label control?I have a users table with a fullname field. I want to query the table and retrieve the fullname where the usertable.username = Session("loggedinuser")I can make the SqlDataSource ok that has the correct Select query, but not sure how to bind the label to that.thanks,Bruce
We have some reports that allow null values for parameters and I find the "Null" label next the parameters in the report viewer to be completly the wrong thing i want to show to business users.
Has anyone worked out a way to change this label to something more meaningful?
I have a parameter "country" that currently has something like 50 labels (each with a different value) for different countries. I want to be able to design this so that I can select US, Canada and World. This requires me to put multiple values under the "World" label.
I reviewed many threads and looked through many pages in my book, I cannot find my answer.
I have a report in need of carrying multiple values per parameter label. Here is the report parameter and how it is used;
Our IS system considers A-Active, L-On Leave, P-Paid Leave to be "Active" Our IS system considers T-Terminated, D-Deceased to be "Termed"
Instead of having to have the user click upon three options (A, L, P), I would like to group these and have the Label appear as "Active", while the two options for "Termed" (D, T), would appear as the second parameter option.
Does anyone know how I would get this correctly setup in the Report Parameters... module?
I have an "Issues" table for my technicians. An issue can be on "hold"or "assigned".I want to get a count for each tech with a column showing number ofissues on hold and a column for number of issues assigned. It wouldlook like this --Tech Num_Assigned Num_On_HoldFred 3 10Carol 6 7I can get each column separately, but I want both in the same answertable!Is that too much to ask??? :)
Hi,Don't worry about the vars, they are defined,the following line give me an err of "Incorrect syntax near '.'."Goal: to rename nonstardard column name.EXEC sp_rename '+@tbuffer+'.['+@cbuffer+']','+Replace(+@cbuffer+','%[^A-Za-z0-9_#$@]%','')','COLUMN';Thanks.
I am trying to display a report parameter value in the report body, but when I run the report it is displaying the actual dimensional value [Product].[Category]&1 instead of the value that user has selected "Bikes". The report is built on Analysis Service data mart.
Environment: SQL Server 2005 - Analysis Services & Reporting Services.
Trying to create a new job from sql server 2005 Management Studio. The nifty wizard under Management provides options to create backups, and clean history, but I cant seem to find out how to create a job to purge old backups.
Looking at the commnand line Sql Server Agent Job shows:
When I open a report in Report Server it opens up with the parameter area open, showing available paramater lists.
However when I call the same report from another report the parameter area is closed. I would like the default behavior to be the same - an open parameter display area.
Hello, I see the following in connection strings all the time: providerName="System.Data.SqlClient"/> For example:<connectionStrings><add name="classifiedsConnection" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|classifiedsdb.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/></connectionStrings> What is providerName="System.Data.SqlClient" ? What is it used for?Thanks, Jim
I am a non-technician and have had an .asp site with an SQL database on a shared server for several years. I now need to move to a new shared server and want to understand as much as possible and to be able to continue accessing my data directly. I have used Enterprise Manager in the past, withut really even knowing what it was or what it was a part of, to pull lists, etc. I am now using Vista and the new hosting company says I can download Enterprise Manager from Microsoft.com. I tried and found only the ability to download SQL Server 2005 Express. This seemed to imply I would get Enterprise Manager as a result. I attempted to download SQL Server 2005 Express, following all the instructions. When it said I had sucessfully finished, I went to All Programs to find it and found "MS SQL Server 2005" listed. Under the lising I found "Configuration Tools" .
Under Configuration Tools I find three more options: "SQL ServerConfiguration Manager", SQL Error and Usage Reporting" and SQL Server Surface Area Configuration" These are all Greek to me and I am uncertain if I even got the "SQL Server 2005 Express" program downloaded.
I'm trying to embed a report into a CRM IFrame. So I have the report created in Business Intelligence Visual Studio 2005, but I need to display it with none of the header details SRS displays by default.
Using the following URL I included rc:toolbar=false and rcarameters=false but they don't seem to make any difference. I basically need to display the report content as if it were part of that page and not an SRS hosted page.
I have a handful of reports that are currently used by sales reps, and I'm trying to make them available to their regional VP's, and coporate users (executives and administrative staff that support Sales nationwide).
Currently, the reports take the UserID and resolve it to show the information that is only appropriate for that specific rep.
What I would like to do is have the parameter section at the top of the report be displayed for higher level users, so they could select an individual sales rep from a drop-down. (Ideally, the RVP's would only be able to select from reps in their region, but the corporate users would be able to select any rep.) The problem is, I don't want any of the sales reps to be able to select a rep other than themselves, for obvious reasons.
Is there a way to have the parameter section hidden/displayed dynamically, based on the UserID, so that users other than reps would have the ability to enter the desired rep name, but reps would not?
I'm trying to embed a report into a CRM IFrame. So I have the report created in Business Intelligence Visual Studio 2005, but I need to display it with none of the header details SRS displays by default.
Using the following URL I included rc:toolbar=false and rcarameters=false but they don't seem to make any difference. I basically need to display the report content as if it were part of that page and not an SRS hosted page.
I am trying to figure out a way to toggle the visibility of attribute data based on a parameter. Specifically, I have a report that has many columns that an end-user may not want to see, depending on what they are using the report for. I know you can toggle visibilities on individual columns easily enough, however I want the user to be able to select which fields (at the attribute level) they want visible on the report up in the parameters, via a multi-value prompt.
Which suggests that if only one of the two multivalue parameter id is selected display the same (Parameters!ServiceAttribute.Value(0)).
This works fine when i select both the attributes but throws an exception "Index was outside the bounds of the array" when i select only one of the parameters. Can anyone help me with that?
Also i want this report parameter to allow null i.e. if a user does not select anything he should still be able to view the report. In case of regular dropdowns i have added a <Null> value to the existing values and set the default to null. But in case of multi-value, it does not give an option of adding <Null>
Using a single multi select parameter I want to show/hide 5 tablix's I have in my SSRS 2008 report. Inside the parameter I want to give each tablix a value a have user control which tablix he wants to see. If user selects all 5 he should be able to see all 5 or if he selects only 4 then display only the 4 tablix's user selected or select's only 3 then display only 3 so on so forth.
How to configure the parameter and hidden expression of the tablix.
Parameter 1 = Date Period ex. 20081102 Parameter 2 = Start Date ex. 11/02/2008 Parameter 3 = End Date ex. 12/02/2008 Parameter 4 = Description ex. Period 20081102
For Parameter 2 and 3 it will have available values in a Date Range ex. for Period 20081102 it will have a date range for Parameter 2 = from 10/02/2008 - 12/02/2008 for Parameter 3 it will have from 11/02/2008 - 12/02/2008
The process flow goes like this:
1. I'll select value from parameter 1 2. Automatically parameter 2,3 and 4 should display corresponding values. 3. It works well on first try 4. if i'll try selecting another value for Parameter 1, 5. As expected it should display again the corresponding values for the 3 parameters but Parameter 2 is retaining the value for the previous Parameter.
Why is it happening? Does it have something to do with the date range? How does the sequencing for RS happens? This scenario happens when date ranges for each Date Period have common values.
I have a report parameter named "Schools" which display a list of schools. For example, Alo elementary school, Balo middle school and Calo high school.
When "Alo elementary" is selected the report only display students from that school along with other assessments data fields. same goes for other schools too. But I want to display different data fields for "Calo high school" when it is selected. It is not currently possilbe becasue I am using the same template for all types of schools. There some fields only should be displayed for "Calo high school" but not for any other type of schools.
I can accomplish this by creating two separate report, one for "Calo high school" and the other for other schools. But I want to accomplish this just by creating one report. So when "Alo elementary school" is selected it displays report with certain fields and when "Calo high school" is selected then it displays same fields as "Alo elementary school" but as well as some other fields too in the report. Is this possible? Need help.
I tried to display return value from stored procedure output parameter in Query Analyzer, but I do not know how to do it. Below is my stored procedure:
I need to set a field value based on two date time parameter's.What is the correct syntax to allow me to pass the value into the field in my SSRS expression ?