Results 1 to 8 of 8

Thread: use JOIN to use part of strings

Hybrid View

  1. #1
    Join Date
    Oct 2008
    Posts
    17
    thanks for reply - Sorry I probably haven't explained properly. I need to see the start of each of the selections rather than the start of the entire selection. E.g what I have now.
    Richard Jones, Peter Jones, Geoffrey Thompson, Frank Hughes, James Johnson, Doris Smith, Janet Jackson ......

    with each trimmed:
    Richard , Peter Jo, Geoffrey, Frank Hu, James Jo, Doris Sm, Janet Ja ......

    My actual examples are much longer so I'd like to trim after 10 chars.

  2. #2
    Join Date
    Jun 2004
    Location
    Atlanta and Manhattan
    Posts
    607

    Comments ...

    After trying this in a sample report with multi-value params turned on, I think it could be done with a JOIN(), SPLIT(), TRIM() and then a re - JOIN(), or some such logic, but it will get very stringy. What is the source of your parameter picklist? If a table, you can always create an alternate "short name" that you then pull into the picklist, and avoid the whole stringing exercise, which might degrade performance of the report at runtime, etc. (If it can even be accomplished ...).

    Is the data source OLAP or relational? To what are you pointing your report parameter Value and Label fields? You could generate a third field in the supporting dataset, called (for example) Picklist Label, and either place a trimmed field in the table (etc.), or do it as part of the supporting SQL / MDX query, and then reference the new field in the Label field. The tradeoff would be that the name is also trimmed in the picklist - but if you're talking trimming to 10 characters with what you currently have, I'd think that the picklist is overly wide, as it ...

    Just an idea ... HTH.

    Bill

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •