Converting Case for a text field on the fly?

  • folks

    I don't do much reporting, but I have to help a user with a text box in a report that displays company name as Amazon, for example.

    She needs to have it converted to "AMAZON". The data comes from the SQL Server as Amazon. I don't want to change the Stored Proc or the field in the tables.

    Is it possible by using some commands like UCASE?...

    Any help is welcome.

    Paresh

    Paresh Motiwala Manager of Data Team, Big Data Enthusiast, ex DBA

  • the UPPER function is what you want in the query, or you can format it in the report side of things with the UCASE or .ToUpper function;

    similarly, there is a LOWER() function as well:

    SELECT

    UPPER(CompanyName),

    LOWER(CompanyName)

    from YourTable

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Hi lowell

    thanks for the quick response. Making change to the sql query is not an option at this stage.

    I was just wondering, if within the BIDS, if we can make any changes to make it happen.

    Cheers

    Paresh

    Paresh Motiwala Manager of Data Team, Big Data Enthusiast, ex DBA

  • You could use an expression in the report, from memory, they support a lot of VB/VB.net functions, which are sure to include either a strconv (string convert) function or a UCASE or UPPER.

    Steve.

  • What steve said is right. The actual code would be

    ucase(fields!ifieldname.value)


    I'm on LinkedIn

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply