Report with 52 Weeks (A year) of data as columns

  • I have been requested to create a report with 52 Weeks of the year as columns .

    For Ex :

    Week1 Week2 till ... Week 52

    Name|Place|Sun Mon Tue Wed Thu Fri Sat | Sun Mon Tue Wed Thu Fri Sat|Sun Mon Tue Wed Thu Fri Sat |

    I just want some Ideas on what is the best way to approach such kind of report .

    Is Reporting Services Table or Matrix report feasible .

    Any Ideas in this direction is appreaciated.

    Thanks,

    Venkat

  • Pre-aggregation is essential to such reports. Please see the following articles...

    http://www.sqlservercentral.com/articles/T-SQL/63681/

    http://www.sqlservercentral.com/articles/Crosstab/65048/

    Yes, you can use a Matrix to do similar... if there's not too much data to clog the pipe with.

    --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)

  • If the report is for CRM (Microsoft Dynamics ERP Solutions), use a calendar table, you can then allow the users to select a week (1-53 for example), make week start with Sunday and end with Saturday.

    Parameters:

    ...,...,Year, Week, Startdate, Enddate.

    OR

    Parameters:

    ...,...,Year, Week.

    If not for CRM, then you can use Jeff's links (Cross Tabs and Pivots).

Viewing 3 posts - 1 through 2 (of 2 total)

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