Bruce
Bruce

Reputation: 35285

Crystal report - print count of a record

I am working on VS 2005. I am using 2 databases called student and group.

student (student_id,group_id(int)) group (group_id(int),group_name(varchar))

I have created a connection to the database.

Now I have to create the following report

Group Name Count Biology 14 Computer Science 10

and so on

How do I go about it?

Upvotes: 0

Views: 1995

Answers (2)

craig
craig

Reputation: 26272

So, you want a report that groups by Group and counts the Students in each Group?

Insert a group in Crystal Reports on group_name.

Drag the student_id field to the Details section.

While the field is selected, right-click it and select Insert | Summary. Choose Count, then Group #1.

Right click in the margin to the left of the Details section and choose Hide.

Run the report.

Upvotes: 1

MartW
MartW

Reputation: 12538

Insert a summary field in the footer of each group which is a count of your primary key.

Upvotes: 1

Related Questions