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

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

Omitting text part using expression

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :Sql Server
Hello guys, i am newbie here. I wanted to omit some part of text value using expression. for example, i want to get rid of the part that are in the () from CAT 980 Loader (LO02). What function should i use here? i tried to use trim, right, left etc. No luck. Please help. Regards, Saikhnaa

View Complete Post

More Related Resource Links

Regular Expression, Email Validation, Consective dots name part

Hi All Can you please help me to modify this regex to validate consecutive dots in the name part (before @) of the email string.  For example, i want to disqualify an email string like (george...antony@gmail.com).  But an email string with single dots in the name part should be allowed (george.antony@gmail.com).   This regex is validating the consecutive dots after the @ sign (domain part) .    All other validation with this regex is as expected.   ^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$     Thanks in advance george

Can the default member for the sql server analysis filter web part be a mdx expression or not

I have designed a dashboard , some parametrized reports ( on date and time) in my case with a cube as datasource, added an analysis services 2005 filter, connected it to the reports. The issue concerns the default value for the filter . I f I choose [Date Local].[Calendar Hierarchy].[All] it works well. But the business requirement is to use the last day where there have been registered a measurement which in my case looks like the following mdx expression: Tail( Filter ([Date Local].[Date Key].[Date Key].Members , ( ( [Advisor Organisation].[Advisor organisation].[Contact Center].&[Denmark]&[Kundelinjen], [Measures].[Calls Offered] , [Date Local].[DK Holiday].&[False] , [Date Local].[Week Day].&[True] ) > 0 ) ), 1).Item(0).Item(0) The expression is all right as I use it in my report as an mdx filter expression. But when I use apply it I get an invalid dafault member value. So the question is : Does the filter support an mdx expression ? If yes, is there another syntax or change in order to make it work ? Thank you a lot for your answer.

SSRS BUG? When a FontStyle expression is used in a report, the Browser Text Size setting overrides t

I have created a report that has the same font size for all the sections in the report. Some sections' fields use a FontStyle expression that changes the FontStyle between Normal and Italics conditionally. I run the report through the reportserver interface and the report looks fine. I run the report through the ReportViewer control and the the fields which use the FontStyle formula are overridden by the Browser's Page Text Size. Also, when I look at the inline HTML Style that's generated, the fields with the formula don't have a style, they are blank, while the fields with without a FontStyle expression have an inline HTML Style generated. And this is probably why the browser text size setting can override. This seems like a ReportViewer HTML render bug... Or is there a way around it??

How to: textbox text should show only the last part of the string

Hi, I have a textbox that shows info. (filename) When the filename is smaller than the width of the textbox all is fine, but when the filename is longer, i would like to show the last part of the filename in stead of the first part (default). Is this possible?

How to select some part of a text in listview item?


Dear all

I have a listview in WPF application, that I bind data in it using gridview. now I want to make a search for it. making search is simple but question is this I want to make a search that if user type 'a' then system will highlight all 'a' in list view. or if user type 'lis' the system will highlight all 'lis' in that listview.

Is it possible to highlight part of the text in side of listview item? or I have to select whole listviewitme? 


Thank you so much

Help with a regular expression to skip certain text

I am trying to write a regular expression to find rtf tags with an rtf document so I can strip them out and get the text. And before everyone says to use the RichTextBox control we already used that but this causes problems since this DLL is being converted into an assembly that is used by SQL Server. And since RichTextBox is dependent upon System.Windows.Forms it is causing use problems.

I've never really used regular expressions and found some samples people used to strip the rtf tags. And it works for majority of the tags. But I created an RTF document which looks like the following;

the directory name is c:\par\li\rtf\text stuff in the name.
How does rtf save things with {\par \f2}

Here it is as RTF text;
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
{\*\generator Msftedit;}\viewkind4\uc1\pard\sa200\sl276\slmult1\lang9\f0\fs22 the directory name is c:\\par\\li\\rtf\\text stuff in the name.\par
How does rtf save things with \{\\par \\f2\}\par

So I need the expression to skip the directory name C:\par\li\rtf\text - and yes I used rtf tags in this directory name to see how it would be handled
I also put in {\rtf and \f2}

The expression I have is the following;

matchpattern =

Partially Bold Text in SSRS 2005 using Expression ?



I am using SSRS 2005.

I have one requirment. I need to Partially Bold some part of Text in column.

Below is the Example.

Name < - -- Column in SSRS 2005 Report.

This column contains combination of Last Name and First Name. All Database record contains Last name , while in some record our requirment is to append First Name with that.

That is i aleady handled using Nested IIF Expression.

Now, i want to display appended First Name in normal while all Last Name whihc is Database Field in BOLD Font.

How is it possible ?


How to write expression to get title name in bold and value in normal in a single Text Box



I have a requirment, where I need to display like Service Provider : Ram in one text box. I have written expression   ="Service Provider :"+Fields!Name.Value for this but I am getting any properties to make Service Provider : in bold. Please anyone can help me out.

For example:

If I want to display Service Provider  in Upper Case and Fields!Name.Value In Lower Case I can write Below expression to get this.


regular expression alphanumeric all text not contains !


hello all am performing a validation on textbox I need to make it match this



the regular expression must match the whole word , not just contains !! I am writing this one but it's not giving right results




Regex alphaNumbericStringRegex = new Regex("^[A-Za-z0-9]$")

How to change the background and font color of text for a web part header - Sharepoint 2010


Hi I am trying to change the font color and text Header color of the web part, can any one help me with that


Decode as part of an IN expression


Good day,

Based on the value of a parameter I would like to either pass in a multi-value parameter or null. Below is the syntax that I am using. If I pass one value into :assign_group it works fine but when I add two or more it tells me that I am missing a ")". I have placed them around the field and around the decode statement with no luck. Is this even possible?

kmdocumentm1.assign_group in Decode(:version,'Populated', (:assign_group), 'null')


make bold part of the text



Is there a way to make bold part of the text in table cell in Reporting services 2005? Maybe some function that can do this?

restrict rich text box to certain fonts and colours in content editor web part - Sharepoint 2010 -




Just wondering if anyone knows a way to make only certain fonts and colours available to rich text box in the content editor web part?

also is there a way to make only certain features available in the rich text box, ie only let the users change font, but not let them use bullet points etc.




Part of the text is disappearing when sent from ASP.NET page



I have created an ASP.NET page to access Sharepoint List (Win 2003, WSS 3.0). I am accessing connecting to the Sharepoint site through Sharepoint webservices.

ASP.NET site has a form with text boxes and when we press OK, we send this information to the richtext columns in the sharepoint list.


It works fine as long as we write simple text but as soon as we add some markup, for example " Hi,<b> there </b>", it the list is updated with only Hi, and the part in the markup and the text that follows disappears.

Probably the problem is with the XmlElement that we send. Can any one help me?


myList.UpdateListItems(ListName, xBatch)

Creating a Text change event as web part



I have a list, in which I have added a column( asp.net textbox) using SharePoint designer.

I want to create a web part, in which on the textchange event of the textbox, i want to do some server transactions and update another asp.net textbox in the list page.

I have created the list. Created a textbox and in the Textbox datafield, associated it with the column created in list through the site.

How to create a textchange event as a web part?

Thank you

Background on html/rich text editor in content editor web part?


Hi All,

Does anyone know what in the CSS controls the background of the rich text/html editor in the Content Editor Web Part?  Mine is picking up the background of my page layout so I must have accidentally changed it somewhere, I'm just not sure where...


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