.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Passing a Text Value as DataView Filter Parameter

Posted By:      Posted Date: September 17, 2010    Points: 0   Category :SharePoint
I have a dataview to which I would like to pass a text value for use as a filter.  My text value is on the same page within a DIV tag that I have given an ID.  When I view the page in the browser the text is actually rendered in a SPAN tag, within the DIV tag.  I have tried the ID for both the DIV and SPAN tags when setting up the parameter, and have tried using both a parameter type of Control and Form, but nothing I've tried is working. Any thoughts?  Thanks, Chanda

View Complete Post

More Related Resource Links

Specifying a parameter in a matrix filter - the data type automatically changes to 'text' when it



When specifying a parameter in a matrix filter (Report Builder 2) the data type automatically reverts to 'text' when it should be 'date/time'.  Removing the parameter and re-adding it displays it correctly as 'date/time' but this isn't saved when clicking 'OK'. 

The problem only becomes apparent when the parameter is set to 'allow multiple values'.  Once this is selected the report throws up the following error:

"An error has occured during report processing. The processing of FilterExpression for the tablix 'Tablix1' cannot be performed.  Cannot compare data types System.String and System.Object[]. Please check the data type returned by the FilterExpression."

Is this a bug with Report Builder 2 or is there something wrong with my report model?

Any help/guidance greatly appreciated.

Filter search over multiple text columns


Hi everyone,

I'm working on a library that stores information on various cases. The case table has several columns that contain descriptive strings on what happened in the case. I would like to create a single filter that returns all cases where the search string is found in any of the columns. I've looked at Dynamic Data Filtering, but as far as I can tell, the "Contains" filter only allows you to connect to each column individually. Has anyone tried this?



How to pass a parameter from a choice filter with project IDs to a KPI web part?



I have an excel pivot table like this:

Report Filter: Project ID
proj_name     Status 
A              70
B              60
C              80

I have this workbook published onto Sharepoint server through excel services.
On the site i have a choice filter that has all the project ID's. I am able to show this table in a web part and filter the web part by passing parameter from the choice filter to the report filter in the workbook as shown above.
I added a KPI webpart that uses the "status" from the above table as its indicator value. What I want to do is that I want to pass the parameter from the choice filter on the site to this KPI web part so that it will show me the corresponding status dynamically accoring to the project chosen.
Can someone help me solve this problem?

Passing Id in parameter


Hi, I am using url in my mvc application like /product/edit/5, should change it because users can

change id parameter and access different product as this Id directly refer to Id in product table, I have validation there for user to access product, what you suggest, what best practice can be for it ?

should I continue with it or should I change it as application has many users

Thanks you


ascx control with passing parameter

i want to create a ascx control with passing parameter .i got followong code from stackoverflow<% Html.RenderPartial("~/Views/Shared/MyControl.ascx", {data model object}) %>i am fine above line but how can i design html control for this.sample code example would be great.

Performance problem when passing a "nullable parameter"

Say @startDate and @endDate are my datetime parameters. If users does not want to limit the @startDate for example, he/she sends a null value to @startDate. Same goes for @endDate (and any other parameter). What I like doing: Select * From MyTable Where MyTable.Date >= IsNull(@startDate, MyTable.Date) And MyTable.Date <= IsNull(@endDate, MyTable.Date) The above looks nice as far as coding but when I look at the execution plan I'm surprised to see the my clustered index (that has it's first column as "MyTable.Date") is not used. instead I get an index scan. More frustrating is that the following works with an index seek and is much faster: Select * From MyTable Where MyTable.Date >= @startDate And MyTable.Date <= @endDate So what should I do? am I doing something wrong? I don't want to use dynamic sql because it's generally slower and prone to sql injection (is dynamic sql my only choise)? I don't want to use "if statements" because then i'd have to rewrite my code several times (in this case three combinations but some of my procedures have up to 8 "nullable" parameters). Or maybe there is another way of implementing what I call here "nullable parameters". obviously I preformance is crucial. thanks, Dror

Response.Redirect in C# for page to page parameter passing

Looking for examples of this, but can't find anything specific. I'm new to ASP.NET, and C# at the same time... so I'm struggling to get it right...  Thanks, Nick

problem with passing parameter values to stored proceedure from asp.net c#

hi all, i am facing a problem while passing parameters to a stored proceedure. following is my sql query written for creating this stored procedure:   CREATE proc [dbo].[getstudent]( @wherecolumn nvarchar(2000), @wherevalue nvarchar(2000)) asbegin  declare @sql nvarchar(max) set @sql = 'select * from student2 where ' + @wherecolumn+'='+@wherevalueexec sp_Executesql @sql end   my table contains four columns: And the sql Query For the table is as follows:   CREATE TABLE [dbo].[student2]( [name] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [rollno] [int] NOT NULL, [class] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [section] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, CONSTRAINT [PK_student2] PRIMARY KEY CLUSTERED ( [rollno] ASC)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]) ON [PRIMARY]   from page behind I am passing the values to parameter as follows:   SqlCommand command = new SqlCommand("getstudent", c.con); SqlDataAdapter datadapter = new SqlDataAdapter(c.cmd); command.CommandType = CommandType.StoredProcedure; command.Parameters.Add("@wherecolumn", SqlDbType.NVarChar).Value = "rollno"; command.Parameters.Add("@wherevalue", Sq

Parameter passing from masterreport to subreport

what If I'm passing a parameter which is null ?? and if the parameter is an integer? My subreport query is : SELECT    ...FROM ... WHERE ... and (CRMAF_FilteredContact.ownerid = @ownerid  OR @ownerid IS NULL) ORDER BY CRMAF_FilteredContact.OwnerIDname When I try it with a null value in the subreport, it works fine, but when I try it from  the main report, so I tried to remove the ownerid parameter, I tried to put it at blank, I tried to put NULL but I've always an error, the report start fine but then, on the total, i've the error "error subreport could not  be shown". I've the error : [rsErrorExecutingSubreport] An error occurred while executing the subreport subreport3: One or more parameters required to run the report have not been specified. But then I don't know how to fixe it.  I put the @ownerid as blank, but obviously it doesn't like it. I've done that because i'm using the same sub report above but grouping with this parameter. How can I manage this ? Thanks a lot,  

Passing parameter into Web Service

Hi, I'm creating a web service using C#, and wondering if it is possible to capture the parameter passed in from the URL?e.g. http://www.abc.com/webservice/service.asmx?para1=one&para2=twoIs there a function or something that can obtain the parameters like the normal Request.QueryString? Thanks in advance! Rgds

passing parameter using ODBC - mysql

Dear All, I'm having problem on passing parameter on odbc because it's not working at all.  I tried this using sql and I have no problem at all. All are working fine.  Is there a different syntax on odbc?  Here's my code: Private Sub BindDetails() ' Obtain the index of the selected row Dim selectedRowIndex As Integer = GridEmployee.SelectedIndex ' Read the employee ID Dim IDNumber As Integer = GridEmployee.DataKeys(selectedRowIndex).Value ' Define data objects Dim conn As OdbcConnection Dim comm As OdbcCommand Dim reader As OdbcDataReader Dim connectionString As String = _ ConfigurationManager.ConnectionStrings( _ "mysqlconn").ConnectionString ' Initialize connection conn = New OdbcConnection(connectionString) ' Create command comm = New OdbcCommand("SELECT employee.IDNumber, employee.EmployeeID, project.ProjectName, team.TeamName, employee.Username, employee.`Password`, employee.LastName, employee.FirstName, employee.MiddleName, employee.NickName, employee.EmailAddress, employee.DateHired, employee.LengthService, employee.RegularizationDate, employeestatus.EmployeeStatusName, employee.Birthdate, employee.Mobile1, employee.Mobile2, employee.Phone1, employee.Address, employee.Colleg

SSRS 2005 Drillthrough chart Passing Wrong parameter value

Hi I have a drillthrough report that in Report A I have a week of data, showing Sunday through Saturday on the X-axis. When a data point is clicked on this chart, it shpuld pass the date of the weekday for that data point to Report B. But sometimes, it passes the prior weekday date, eg click on the Monday date data point, but Sunday's date is passed to the next report. Has anyone observed this type of behavior? I should mention that it is intermittent.   Thanks all.   Bobrpress

Parameter or Filter?

Hello together. I am straight at a Expense report tool and need a parameter for the date. I have already a Paramtere for customers. My question is how I can issue data "of - until"? e.g. 11.09.2002 - 11.09.2010 Already much tried, however if I spend the date, the wrong customer is indicated. but I want only these customers, who have a Expense in this period. Sorry for English. I started just three months ago. Reagards Patrick

BDC need explanation about parameter, filter and OOB WP

Hi, I'm actually working with BDC and I have to say I'm really disappointed about the documentation I found. So I have many questions and I hope some people will be able to help (at least partially) as I'm getting crazy. 1. When we have a BDC Data List WP with some filters is there a way to get ride of the filter "form" on top of the WP? 2. When we have a method with parameters in the ADF (a finder method). How are the parameters passed to the method (when we use a BDC Data List WP for example). How about programmatically? Is it necessary to associate a filter to the parameter (in the ADF)? 3. For an entity in the ADF is it possible to have more that one Finder/SpecificFinder method. If yes how the OOB WP manage it?

Problem passing a text box value from aspx.cs page to SelectParameters in aspx page

Hi,I would like to take a value from a text box and pass it as a search parameter to my database. I get the value from my code behind page as follows: protected void btn_click(Object sender, ImageClickEventArgs e)      {           AccessDataSource1.SelectParameters["inputValue"].DefaultValue = TextBox1.Text;           string test = AccessDataSource1.SelectParameters["inputValue"].DefaultValue;                      //string inputValue = TextBox1.Text;          //Response.Write(inputValue);         // AccessDataSource1.SelectParameters.Add("@name", inputValue);          //Response.Write(@inputValue);                              } protected void btn_click(Object sender, ImageClickEventArgs e)     {          AccessDataSource1.SelectParameters["inputValue"].DefaultValue = TextBox1.Text;          //An alternate option I have used is          //string inputValue = TextBox1.Text;         // AccessDataSource1.Selec

Filter datatable by passibg parameter containing wildcards

Hi I want to filter the DataTable. for filtering the the datatable I am  passing the string parameter which contains multiple wildcards ( e.g. string strSearchValue = "test%str%g")   Can anybody help how should I achive this? I am using VB.Net 2008 .

Passing multi values to another multi value parameter

Hi, my requirement is as follows I have a parameter1 in which i populate values from database. the user can select multiple values from parameter1. after the parameter1 i have another parameter2 which is also mutliselection value. i,e depending on the selection of parameter i need to populate remaining values in Parameter2 (which is also a multi selection value). i have splited the values from parameter1 and passed the value of parameter1 (parameter1.value) to parameter2. but i am getting the following error An expression of non-boolean type specified in a context where condition is expected, near ',' incorrect syntax near the keyword 'ELSE' can anyone help me in this Thanks, Rajesh Peethala
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend