none
SSRS + Programmatically move columns to a new row

    Question

  • Using SQL Server 2008 R2.

    I have a report where the client wants a full years worth of data by each month. Each month has 5 columns. We would like to display the report by showing the following:

    January                              February                                 March

    col1, col2, col3, col4           col1, col2, col3, col4                col1, col2, col3, col4 

    April                                   May                                       June

    col1, col2, col3, col4           col1, col2, col3, col4                col1, col2, col3, col4 

    How can I program the report that limits the number of columns to only three months worth of data? Do I have to create a sup report, or is there something I can do with grouping? Any help will be appreciated. Thanks!

    Monday, June 24, 2013 6:08 PM

Answers

  • Same thing. You are talking about grouping on quarters and months. each quarter will have 3 months.

    val it: unit=()


    • Edited by MSDN Student Monday, June 24, 2013 6:56 PM fooccccccccccccccccccccc
    • Marked as answer by DaveatCE Monday, June 24, 2013 6:58 PM
    Monday, June 24, 2013 6:46 PM

All replies

  • in SSRS you need to use groups on columns.

    the first group on column would be months. and under that would be the col1, col2.

    Depending on how many months of data your query is fetching, the column group will render the grid accordingly.

    http://technet.microsoft.com/en-us/library/bb677373(v=sql.100).aspx


    val it: unit=()

    • Marked as answer by DaveatCE Monday, June 24, 2013 6:19 PM
    • Unmarked as answer by DaveatCE Monday, June 24, 2013 6:21 PM
    Monday, June 24, 2013 6:15 PM
  • I don't think I explained my problem correctly. Let's say it is May. The client runs the report and the first "group" of data is Jan, Feb, and March. The second row and "group" of data will include April only. If I am running for a full year, then I will have 4 "groups" of data each having three months. Does this make sense?

    Oh, and by the way, thank you very much for your help!

    Monday, June 24, 2013 6:24 PM
  • Same thing. You are talking about grouping on quarters and months. each quarter will have 3 months.

    val it: unit=()


    • Edited by MSDN Student Monday, June 24, 2013 6:56 PM fooccccccccccccccccccccc
    • Marked as answer by DaveatCE Monday, June 24, 2013 6:58 PM
    Monday, June 24, 2013 6:46 PM