Monday, February 20, 2012

Reporting Services, Visual Studio, Layout, Grouping

I'm creating a report with Visual Studio 2003 and the reporting services
project.
I'd like to group like:
1/04
$20
2/04
$30
Right now I'm getting the grouping:
1/1/04
$10
1/2/04
$10
1/3/04
$10
The data is stored on a daily basis and it needs to be summed by month.
Thanks,
JimI assume you have a field representing a DateTime object and you want to
group by month. Keep in mind, you can group on any function - so try this as
grouping expression:
=Year(Fields!SalesDate.Value)*100 + Month(Fields!SalesDate.Value)
Documentation on Year() and Month() is available on MSDN:
* http://msdn.microsoft.com/library/en-us/vblr7/html/vafctyear.asp
* http://msdn.microsoft.com/library/en-us/vblr7/html/vafctMonth.asp
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Jim" <Jim@.discussions.microsoft.com> wrote in message
news:126E457A-AACF-4F28-B809-EE607A3BE6A8@.microsoft.com...
> I'm creating a report with Visual Studio 2003 and the reporting services
> project.
> I'd like to group like:
> 1/04
> $20
> 2/04
> $30
> Right now I'm getting the grouping:
> 1/1/04
> $10
> 1/2/04
> $10
> 1/3/04
> $10
> The data is stored on a daily basis and it needs to be summed by month.
> Thanks,
> Jim

No comments:

Post a Comment