none
Grouping Data by Month in rdlc? RRS feed

  • Question

  • Hi there

    I am creating a rdlc report where I want the data to be grouped by month. I am using the following expression.

    =Fields!Sort_Date.Value.ToString().Substring(5,2) 

    The Sort_Date field is the CCYY-MM-DD HH:MM:SS format. The group does not work.

    Should I rather cater for this in SQL, or is there a way that the rdlc can cater for this?

    Mnay thanx.


    It's not the blowing of the wind that determines your destination, it's the set of the sail. J Rohn
    Monday, November 3, 2008 7:39 AM

Answers

  • I went the SQL route. The expression now looks as follows:

    =Fields!GroupMonth.Value 

    Seems like 95% of the work is done in SQL.
    It's not the blowing of the wind that determines your destination, it's the set of the sail. J Rohn
    • Marked as answer by HennieSmit Monday, November 3, 2008 8:44 AM
    Monday, November 3, 2008 8:44 AM

All replies

  • I went the SQL route. The expression now looks as follows:

    =Fields!GroupMonth.Value 

    Seems like 95% of the work is done in SQL.
    It's not the blowing of the wind that determines your destination, it's the set of the sail. J Rohn
    • Marked as answer by HennieSmit Monday, November 3, 2008 8:44 AM
    Monday, November 3, 2008 8:44 AM
  • grouping is actually something done very well by the reportviewer.

    The table control has built in grouping functionality.

    Simply right click on the table handles on the left of the table, and choose insert group.

    Set the field to group on and your done.

    You can include headers or footers for the group if you like.   Also, by using the built in grouping functionality, your functions such as sum and average will automatically know they are in a group and give you a sum based on just that group.   Unless you specify otherwise.


    Living my life at 123mph in 11.15 seconds
    Monday, November 3, 2008 6:54 PM