How get last 5 quarters data using ssrs parameter

  • Hi All,

    i have an ssrs report in which Quarterly/Yearly paramter is there

    when i select quarterly i have to get last 5 quarters data including current quarter

    and when i select yearly i have to get last 5 years data including current year

    can any one pls suggest me how to get this.....

  • If you are allowed to write your own stored procedures for reporting, I would do it there. You could pass a value for the units to the DATEDIFF function, so that if you chose "years" it would use 'yy' and if you chose quarters, it would use 'qq'.

    For more on DATEDIFF, check out this page: http://msdn.microsoft.com/en-us/library/ms189794.aspx

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

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