This is a migrated thread and some comments may be shown as answers.

Join 2 tables and Count the number of rows

1 Answer 92 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kelum
Top achievements
Rank 2
Kelum asked on 02 Dec 2014, 04:52 AM
 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 , 


















1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 04 Dec 2014, 01:11 PM
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.

 
Tags
General Discussions
Asked by
Kelum
Top achievements
Rank 2
Answers by
Stef
Telerik team
Share this question
or