none
VS2010 Embedded Report - Tablix Group by Date without time RRS feed

  • Question

  • Hi Folks,

    I am trying to create a report with a tablix that contains the following layout

    12/11/2011

                         11:00    Some data
                         12:00    Some more data

    13/12/2011

                          18:00   even more data

    Basically I want to group by the date (without the time) and then sort by time in the second column.  However, I seem to be only able to get the following, no matter what I do with the grouping or date formatting.

     

    12/11/2011     11:00  some data

    12/11/2011     12:00  some more data

     

    The first field being returned from the DB is  dbField.value.date  (DateTime? in C#), second field is a timespan 

     

    Regards

    Andy

     

    Tuesday, April 19, 2011 11:17 PM

Answers

  • Eventually found a resolution.

     

    The (LINQ) query returning the data needed to have a group by on the date field.

     

    var someData = from r in dc.myData
                              group record by new { r.aDate, r.aTime, r.somevalue } into s
                              select new MyCustomObject {  myDate=s.key.aDate, myTime = s.key.aTime, someValue = s.key.somevalue} ;


    Then was just a matter of putting a group in the tablix with the correct formatting.

     

    • Marked as answer by AndyW2007 Wednesday, April 20, 2011 2:26 AM
    Wednesday, April 20, 2011 2:26 AM