locked
Is it possible to create dynamic columns in reports RRS feed

  • Question

  • We are designing the report template and fixing the number of columns. Is their any idea to create the columns dynamically at the report generating time/Run time of the reports.

    If you find any examples regarding the same please post the link here.


    Thanks !... in advance
    Monday, April 20, 2009 4:19 PM

Answers

  • I found one solution after all searching. But dynamic columns in reports depends on complexity of template design and dataset this is upto my requirement that i got. I'v done using Sub Report passing the list of columns from main report to the Sub Report then handle which column should be shown as per the example given from the following link.

    How to generate dynamic columns in report
    Wednesday, April 22, 2009 4:55 AM

All replies

  • I found the following example to be very much useful. If any one face the same issue follow the steps provided in the link given below.
    But this might produce blank space while hiding the columns

    How to generate dynamic columns in report
    Tuesday, April 21, 2009 6:19 AM
  • I found one solution after all searching. But dynamic columns in reports depends on complexity of template design and dataset this is upto my requirement that i got. I'v done using Sub Report passing the list of columns from main report to the Sub Report then handle which column should be shown as per the example given from the following link.

    How to generate dynamic columns in report
    Wednesday, April 22, 2009 4:55 AM
  • You could always use a matrix, and have your stored procedure return key-value pairs.

    So instead of having:

    UserID  Surname   Firstname
    1    Farley   Rob
    2    Gosbell   Darren

    You could have:

    UserID  Key  Value
    1   Surname   Farley
    1   Firstname   Rob
    2   Surname   Gosbell
    2   Firstname  Darren

    Then a matrix will easily do the dynamic columns for you.

    Rob
    http://msmvps.com/blogs/robfarley - http://www.lobsterpot.com.au - Adelaide SQL UG President - Did this help? Mark it as an answer!
    Wednesday, April 22, 2009 5:05 AM
  • Hi Computer,

    Thank you very much for sharing the solution.

    Thanks,
    Jin
    Jin Chen - MSFT
    Wednesday, April 22, 2009 7:27 AM
  • Hi Rob,

              I'm new to BIDS SSRS. I never created Matrix Component Report. Can u give me any (very simple example) easy to understand link.

    Thanks!... in advance
    Wednesday, April 22, 2009 3:34 PM
  • mm Great article...But,how to manage filters? If we apply filters only the matching columns would be displayed but the rest of them would be displayed...any ideas?

     

    Thanks in advance,

    Prawin


    Prawin
    Saturday, January 28, 2012 6:16 PM