How to bind to a dataset and at the same time trim the text?

Hi,
I want to bind a listbox to a dataset, and the text value in the dataset is not always trimmed.
        Dim dsCity as dataset = GetListOfCity()
        ListBoxCity.DataSource = dsCity
        ListBoxCity.DataTextField = "CityName"
        ListBoxCity.DataValueField = "CityID"
        ListBoxCity.DataBind()
I would like to ask if there is any handy way for me to bind to the dataset and at the same time, trim the text "CityName" when we are binding to it?
Regards,
Xavier

Hi Xavier,
Just as Uri Dimant said, we can use the Trim or Replace function in the textbox to trim leading or trailing spaces of any string. For example, we can use those functions as below:
=Trim(Fields!FieldName.Value)
=Replace(Fields!FieldName.Value, "  ", "")
Besides, those two functions can also be done in the query with SQL.
Reference:
http://venkateswarlu.co.in/MSBI/ssrs/SSRS_Common_Functions__Text.aspx
Hope this helps.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support

Similar Messages

  • I need to know how to edit a drawing - basically remove the arrows and text but at the same time match the background of the existing pic. then re add new text. how do i erase the arrows and text and arrows but match current background of pic. step by ste

    i need to know how to edit a drawing - basically remove the arrows and text but at the same time match the background of the existing pic. then re add new text. how do i erase the arrows and text and arrows but match current background of pic. step by step explanation please beginner

    Please post (a relevant section of) it right on this Forum.

  • How i can wacht video clips in my mac and the tv at the same time trough the apple tv

    how i can wacht video clips in my mac and the tv at the same time trough the apple tv

    Welcome to the Apple Community.
    Unfortunately you can't do that.

  • How do you import a .png file into the Final Cut Pro X and at the same time keep the file's original transparency settings?

    How do you import a .png file into the Final Cut Pro X and at the same time keep the file's original transparency settings?

    Go to the Info inspector for the still image and in settings select the alpha type.

  • I am in the middle of a job using CS 6, but at the same time opening the Creative Suite apps.  I created an InDesign file in CS 6, saved it, and now I can't open it. I'm getting this message: Cannot open file because it was saved with a newer version of A

    I am in the middle of a job using CS 6, but at the same time opening the Creative Suite apps.  I created an InDesign file in CS 6, saved it, and now I can't open it. I'm getting this message: Cannot open file because it was saved with a newer version of Adobe InDesign CC (10.1). You must use that version or later to open the file." AARRGGHH! So how do I access the file?

    Sounds like you opened and saved it in CC, so now you need to go back to CC and either complete the project there, or export to IDML to take it back into CS6.

  • Is there a way I can stream video from my 2012 AirMac to the Apple TV using airplay and at the same time stream the audio to an air speaker?

    Is there a way stream video from a 2012 MacBook Air to a TV using Apple TV and at the same time steam the audio to an air speaker. Also the same question but using an ipad

    You can try one thing. Follow these steps:
    1. On your Mac, turn on AirPlay Mirroring and connect it to the Apple TV, so audio and video will stream from the Apple TV.
    2. Turn off the sound of the TV where you have connected the Apple TV.
    3. Then, make sure that you have turned on the AirPlay speakers. Then, open System Preferences > Sound > Output, and choose the external speakers, so sound will stream from these external speakers.
    This should work correctly

  • Every time i play a song in my i-tune 10.6, about up to half way mark, i-tune will automatically skip to the next track and playing it (next track) at the same time as the current track.

    Every time i play a song in my i-tune 10.6, about up to half way mark, i-tune will automatically skip to the next track and playing it (next track) at the same time as the current track. i don't know if anyone has the same problem, but i haven't sync my ipod touch 4 gen to my i-tune playlist for the longest time, cus i was afraid to transfer the problem to it since i have a pc (win 7) but not MAC.

    i am sorry, guys, but  I really really really need you guys' help. if u know ANYTHING...

  • Am trying to record a basic guitar track while I sing along.  I don't want my vocals to be recorded at the same time but the internal mic seems to be picking up the vocal and guitar sounds.  I tried System Preferences, Sound, Line In - Audio Line Input.

    I am trying to record a basic guitar track while I sing along.  I don't want my vocals to be recorded at the same time but the internal mic seems to be picking up the vocal and guitar sounds.  I tried System Preferences, Sound, Line In - Audio Line Input.  It seems to be a common problem in Garageband for the Mac, ipad and iphone. 

    for me it turned out that the jack into the iMac was loose.  Once I fiddled with it everything worked okay

  • I want to check the status of application No.  For it is written in my account was canceled and I did not do so I urgent news about his condition and the reason for canceled I redial the same time as the sender befo

    Thank you for your attention
    I want to check the status of application No. W439602096
    For it is written in my account was canceled and I did not do so
    I urgent news about his condition and the reason for canceled
    I redial the same time as the sender before you
    We are waiting for you

    This is a user to user forum. You are not talking to Apple here. We cannot help you; you will need to contact wherever the order was placed.

  • How do I read and write at the same time using the NI-CAN channel API?

    Here's the situation.  I have one CAN bus, and I need to read and write channel data (using the channel API) at the same time both at an interval of 20 ms.  It's easy to do one or the other using the channel API, but you can't setup a channel task to do both.  It's either input or output, not both.  Is this even possible?

    Hi,
    yes , this is possible. But you have to create two tasks, one for input and one for output. see the attached example for LabVIEW.
    If you download and install NI-CAN 2.4 you will get this example and one for C and VB as well.
    DirkW
    Attachments:
    Single Sample Input Output same Port.vi ‏79 KB

  • How can i connect to a LAN and external display at the same time using the mini-displayport?

    Hi all,
    At work i'm connected to the Lan via an adapter and the mini displayport. I want to use my external display at the same time, which use the same mini displayport. Are there any splitters available to use both at the same time? Are there any other alternatives?
    Thanks,
    Dennis

    There are USB to ethernet dongles:
    http://store.apple.com/us/product/MC704ZM/A/apple-usb-ethernet-adapter?afid=p219 %7CGOUS&cid=AOS-US-KWG-PLA

  • In Mail, how do I view both notes and emails at same time?

    Is it possible to view the notes pane and the email pane at the same time?  I keep notes about each project I'm working on so it helps to have them up as I'm replying to emails and setting todo's.  If this is not possible, can I move notes out of Mail?

    Just figured it out....all you do is double click on the note.

  • HT2955 The problem with the above is this: If a chapter end is reached at the same time as the CD space is filled, iTunes goes to EOJ, ejects that CD and pretends it's done. Other than entering start:end manually you are screwed. iTUnes just ***** for bur

    If you use iTunes to burn Audible CDs you better hope the book is only one CD long. Otherwise iTunes craps-out without warning and cannot be easily restarted. It just goes to EOJ and pretends it's all done with the entire burn. Often this can cause (will cause) the user to waste many many CDs trying to get a burn completed. If a CD-end is reached at a chapter-end point, iTunes assumes the burn is done and ends. The user must manually enter start:stop for each CD, pay constant attention to what's going on, and hope everything goes right. And even if you do all that you WILL find a chaper point at CD end and will have to go manually adjust the start-stop of the next CD and HOPE... that's their strategy: Hope.  iTunes was never designed for books, for audio content that is multi-volume, and it really ***** at it. And if you are unlucky enough to want to burn long books (Truman -48 CDs, or Atlas Shrugged - even more), be prepared to throw away many tens of CDs as you try to get it done; pretty soon it's just cheaper to go buy the book in audio form and dump Audible entirely. (Maybe this is why Amazon made the switch from working Roxio to non-working iTunes... nahhh.. you'd have to be too cynical to believe that...)  If, that is, you don't just give up in frustration and terminate your Audible subscirption as I did a couple of years ago. Audible keeps your paid-for library, but downloading a long book again just brings you to the same point: trying to burn multi-volume CDs on a tool not designed to do so. Maybe amazon bought lots of Apple stock at the same time and just wants you to be walled-in to your iPod and never again use a CD.. maybe they bought the car companies, too, so you can't have an old car and must buy a new one with an ipod attachment in order to listen to your books..... The worst part is that Audible used to use Roxio, which handled all of this with no problem at all. When it was tasked with a multiple-CD burn, it told you how many you'd need, began recording, when it reach end-of-CD, it told you to put in the next one - regardless of whether there was a coincident end of chapter, and kept burning until the book was completed. For unknown - and seriously stupid - reasons, audible decided to use iTunes, and the problem continues. My research across the web indicates I am not the only FORMER customer of Audible that feels this way, or who cancelled their subscription because of this stupefyingly dumb decision - to make the primary customer interface tool WORSE that it had been.

    AC, Thank you for you reply.
    Even though it is supposed to be a 'simple' home video system it has so much potential!
    And i mean i know there is an solution since i know the Caribbean cruises are using apple as media centers onboard their ships. have to admit that i do not know if they are using frontrow or some other application created buy some other company.. i just know that some one must know how to get around it all and make it work..
    Just wish i had someone to get in contact with that is working hands on every day with this product, and get strait, good, final answers.. no "pro support" since im not happy with their answers anymore..
    I know i start to sound desperate.. but thats because i am..

  • TS2755 keep receiving the same text message multiple times, at the same time of the night. How can I stop this?Thabnks

    Hi
    I keep on receiving the same text message multiple times and at around the same time each night. Any idea how I can stop this happening? The text messages are originating from to separate Saudi Arabian mobile numbers. Both these people are listed in my contacts so do you think if I delete their names it might stop the texts coming htrough each night?
    Cheers

    Deleting the people from your contacts will not stop the messages. Have you tried talking to the people and finding out if they're sending you messages? You could try contacting your carrier and finding out what blocking services they offer. However, theat would block all messages from those people.

  • How do I move all of the control points at the same time at the Path Text preset?

    I'm doing motion typography, I used the Bezier Shape Type, it has 4 control points, I saved the custom preset I made, but the problem is, is it possible to move them at the same time? I'm animating per letter to form a word.
    Additional Question: Is it possible to add more control points? If then, how?
    Thanks in advanced.

    Double-click the path shape to invoke the transform box. Read up on how to use the path tools to insert and modify points.
    Mylenium

Maybe you are looking for