to Concatenate column value

  • Hello

    I have a column name Classname and I would like to to Concatenate value.

    ID ClassName

    1 Class A

    2 Class B

    3 Class C

    4 Class D

    I need a output in ssrs report with title like (Class A, Class B, Class C, Class D) .

    Can I do in SSRS as well ?

    I tried join function in ssrs and I am getting #error join(Field!classname,",")

    Please help on this.

    Thanks

    Bhavesh

  • Please, Any help on this ?

  • Hi,

    You can join only on table valued

    Your expression is not correct you forgot the .value at the end of Fields!FieldName.Value

    But as you are now the join will not work

    What you have to do is to create a hidden parameter and allow multivalue

    Then Create a dataset to populate the parameter

    Finally you can do a join(Parameters!YourParameter.Value,",")

    :w00t: !!!GOOGLE IS YOUR BEST FRIEND!!! :w00t:

  • patla4u (7/29/2015)


    Hello

    I have a column name Classname and I would like to to Concatenate value.

    ID ClassName

    1 Class A

    2 Class B

    3 Class C

    4 Class D

    I need a output in ssrs report with title like (Class A, Class B, Class C, Class D) .

    Can I do in SSRS as well ?

    I tried join function in ssrs and I am getting #error join(Field!classname,",")

    Please help on this.

    Thanks

    Bhavesh

    The reason nobody has helped you is because you didn't provide any details about what you want. If you look at what you posted and think about trying to answer based only what is posted you would find it nearly impossible without a bit of luck. Maybe you are trying to generate a comma delimited list in a single column? Maybe you just want to concatenate the string values together?

    You gave us some sample data but we have no idea what you want for output. Help us to help you by providing the information required to allow us to come up with an answer.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • @ SSC-Enthusiastic :

    Thanks for your help. I think, that will work. let me try.

    Thanks

    Bhavesh

  • It looks like this article would help you out: Creating a comma-separated list (SQL Spackle)[/url]

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

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

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