How to sort by date ascending with an advanced report in report server 2008 RRS feed

  • Question

  • I have a report which i created with the report wizard in visual studio 2008 full version. I am having a problem sorting by the the activity date of the records.

    First its sorted by the owner

    Next its sorted by company name

    and last i need it sorted by activity date.

    The first 2 work with no problems but it wont sort by the activity date! Can someone please help!


    I even tried putting the sorting in the query but this doesnt work either:

    I want the oldest date at the top and the newest date at the bottom:

    SELECT     Company_Contacts.FirstName, Company_Contacts.Last_Name, Company.Company_Name, CRM_Activities.Type, Company.Country, Company.DryQty,
                          Company.TankerQty, Company.TotalVslQty, Company.Managed_Fleet, CRM_Activities.Activity_Dt, CRM_Activities.Description,
                          CRM_Activities.Summary, CRM_Activities.Primary_Contact, Company.CurrentQI, CRM_Activities.Owner, CRM_Activities.Probability
    FROM         Company INNER JOIN
                          Company_Contacts ON Company.ID = Company_Contacts.CompanyID INNER JOIN
                          CRM_Activities ON Company_Contacts.ID = CRM_Activities.Primary_Contact
    ORDER BY CRM_Activities.Activity_Dt ASC


    Thank in advance!
    Thursday, June 2, 2011 7:15 PM

All replies

  • Why cant i place code here - it says its restricted to 60,000 characters - i dont think im adding that much code!
    Thank in advance!
    Thursday, June 2, 2011 7:24 PM