Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Grouping date by week or by month

Author  Topic 

1sabine8
Posting Yak Master

130 Posts

Posted - 2009-01-26 : 08:43:35
Hi,

I have a report where the user passes 'From Date', 'To Date' as parameters.

I need to know how i can display this data by week or by month on the report not by Date.

Also is it possible to ad a parameter where the user will choose how he wants the grouping(by week or by month) and then display data depending on what he chose?

Is it possible?

How?

Thanks in advance

Report post as abusive

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-26 : 08:57:16
yup. its possible. and for getting data in reqd form add a group in table where data is displayed in report and based on parameter set it to datepart(wk,datecol) or datepart(mm,datecol). something like below should be expression

=IIF(Parameters!GroupingParam.value="Week",datepart(wk,datecol),datepart(mm,datecol))
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-01-26 : 09:02:25
Cross post http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=118572



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-26 : 09:16:03
also see this

http://www.codeproject.com/KB/reporting-services/DataGrouping.aspx
Go to Top of Page
   

- Advertisement -