Join 2 tables and Count the number of rows

2 posts, 0 answers
  1. Kelum
    Kelum avatar
    9 posts
    Member since:
    Nov 2014

    Posted 01 Dec 2014 Link to this post

     I have 2 tables , "T_COMMON_COUNTRY" and "T_HEI_STUDENTDATA." using left join I joined these tables , 

    this my query 

    SELECT
    [T_COMMON_COUNTRY].[COUNTRY_ID], 
    [T_COMMON_COUNTRY].[COUNTRY], 
    [T_HEI_STUDENTDATA].[STUDENT_ID]

    FROM ([T_COMMON_COUNTRY]

     LEFT JOIN [T_HEI_STUDENTDATA]

     ON [T_COMMON_COUNTRY].[COUNTRY] = [T_HEI_STUDENTDATA].[STDCOUNTRY])

    I want Count the number of students (Student_IDs) relate to a country , 


















  2. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 04 Dec 2014 Link to this post

    Hi Kelum,

    If you need to get the count in the report, you can use a grouping by Fields.[COUNTRY_ID] and the CountDistinct built-in aggregate function as an expression for a TextBox item located in the GroupHeader/FooterSection. Thus the expression will be evaluated in the data scope per group.

    Let us know if you need any further help.

    Regards,
    Stef
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top