locked
Dynamic Columns Add RRS feed

  • Question

  • Hi,

    I have a One Small requirements. Please suggest which method is best.

    If user add the columns into DB that will be automatically add the columns into the Report.

    Ex: In my Table A initially have Col1,Col2 then it should be display into report

    Table A

    Col1,Col2

    After few days user added Col3 into Table A that should be added automatically.

    Thank you

    Regards

    Venkat


    • Edited by Venkat334 Wednesday, March 11, 2015 11:12 AM
    Wednesday, March 11, 2015 11:06 AM

Answers

  • Its not possible automatically as ssrs will not be able to change metadat at runtime.

    If you need this kind of functionality you need to generate report each time (either manually or programatically) based on the latest metadat for it to work.


    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    ----------------------------
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

    • Proposed as answer by Vicky_Liu Thursday, March 12, 2015 6:39 AM
    • Marked as answer by Vicky_Liu Wednesday, March 18, 2015 2:03 AM
    Wednesday, March 11, 2015 11:21 AM
  • Hi Venkat,

    According to your description that you want to dynamically add the new columns in the table when you add new columns in the DB table, right?

    Generally, the matrix's column group can dynamic increase in the report, if the data of the new columns are all numeric type, you can use the unpivot function to turn the column name of these fields to a single row and then you can add it in the column group or there is no better method to do the dynamic add to tablix, I would suggest you to add new column manually as you don't have too many columns to add at a time.

    Similar threads with details steps for your reference:
    https://social.technet.microsoft.com/Forums/en-US/339965a1-8cca-41d8-83ef-c2548050799a/ssrs-dataset-column-metadata-dynamic-update?forum=sqlreportings

    If your still have any problem, please feel free to ask.

    Regards
    Vicky Liu


    Vicky Liu
    TechNet Community Support


    • Proposed as answer by Vicky_Liu Wednesday, March 18, 2015 2:03 AM
    • Marked as answer by Vicky_Liu Wednesday, March 18, 2015 2:03 AM
    Thursday, March 12, 2015 6:45 AM

All replies

  • Its not possible automatically as ssrs will not be able to change metadat at runtime.

    If you need this kind of functionality you need to generate report each time (either manually or programatically) based on the latest metadat for it to work.


    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    ----------------------------
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

    • Proposed as answer by Vicky_Liu Thursday, March 12, 2015 6:39 AM
    • Marked as answer by Vicky_Liu Wednesday, March 18, 2015 2:03 AM
    Wednesday, March 11, 2015 11:21 AM
  • Thank you, Is it possible through C#?
    Wednesday, March 11, 2015 11:23 AM
  • Hi Venkat,

    According to your description that you want to dynamically add the new columns in the table when you add new columns in the DB table, right?

    Generally, the matrix's column group can dynamic increase in the report, if the data of the new columns are all numeric type, you can use the unpivot function to turn the column name of these fields to a single row and then you can add it in the column group or there is no better method to do the dynamic add to tablix, I would suggest you to add new column manually as you don't have too many columns to add at a time.

    Similar threads with details steps for your reference:
    https://social.technet.microsoft.com/Forums/en-US/339965a1-8cca-41d8-83ef-c2548050799a/ssrs-dataset-column-metadata-dynamic-update?forum=sqlreportings

    If your still have any problem, please feel free to ask.

    Regards
    Vicky Liu


    Vicky Liu
    TechNet Community Support


    • Proposed as answer by Vicky_Liu Wednesday, March 18, 2015 2:03 AM
    • Marked as answer by Vicky_Liu Wednesday, March 18, 2015 2:03 AM
    Thursday, March 12, 2015 6:45 AM