Concatenating Field Values

  • ejoell 66477 (7/13/2011)


    I thought the JOIN(hiddenParameter, ",") would be just what I needed. Unfortunately all I get is a list of "#ERROR". And it still returned one row for each row in the dataset. Anyone have any ideas why this did not work? Point of Information; I need to be able to show a user how to do this in Report Builder 2.0. So code answers and T-SQL answers will not be applicable in my situation.

    Please start a new thread and post the link in here.

  • ejoell 66477 (7/13/2011)


    I thought the JOIN(hiddenParameter, ",") would be just what I needed. Unfortunately all I get is a list of "#ERROR". And it still returned one row for each row in the dataset. Anyone have any ideas why this did not work? Point of Information; I need to be able to show a user how to do this in Report Builder 2.0. So code answers and T-SQL answers will not be applicable in my situation.

    I'd recommend that you find a "Report Builder 2.0 forum". 😉

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Here is the Ans

    = Cstr(Parameters!Location_ID.Label) & ", "

  • Here is the ans

    =Cstr(Parameters!Location_ID.Label) & ", "

  • ejoell 66477 (7/13/2011)


    I thought the JOIN(hiddenParameter, ",") would be just what I needed. Unfortunately all I get is a list of "#ERROR". And it still returned one row for each row in the dataset.

    Actually the Join(hiddenParameter, ",") does work. It is necessary to allow multiple values for the parameter. However it takes a great deal of resources to run on limited Navy resources.

    priyaram51 we were not trying to just join one character to returned field we wer trying to concatenate all the rows together.

    Funny thing as it turns out, that is exactly what the user wanted. He did not want one concatenated string of all the email addresses. He only wanted a list each email address concatenated with a ";", which is so easy that our non-SSRS conversant program manager could do it, (except that he did not know that expressions were written in VB). Then the user would then export the report to a csv file which he would then open in notepad and paste into outlook. Duh.

  • Hi Devo_Scott - The only thing I have ever used for this is the FOR XML PATH like Jeff Moden shared. Being fairly new to SSRS and SSMS, this particular function was tricky for me at times. So I've had issues ironing out that function to work correctly, but one thing I have noticed with SSRS is that the parameter variable has to match exactly (spelling of course, but case-wise too!). Otherwise, it acts like that variable is not there.

    There have been several times I feel like I'm just spinning my wheels and not getting anywhere with my code only to find that SSRS is looking for @startdate instead of @StartDate... :crazy:

    HTH,

    Jessica

Viewing 6 posts - 31 through 35 (of 35 total)

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