Crystal report - print count of a record - crystal-reports

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?

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.

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

Related

Changing Group Count By Adding Fields in Crystal Reports

New but learning!. Using Crystal Reports for this task
I am trying to do a complicated report but I am breaking it down to some manageable questions piece by piece. I have a table for Work orders. I need to start my report by listing all the different departments with in the Work Order Table whit a count of how many work orders by department .. then for each Department a sub report of the different status of Work Orders and count. It seems simple but i keep on getting a count of 1.
What I have done:
Started a new report
Added in WOCATEGORY (Departments)
-selected that field and chose the sigma button to
sum that field
Added a sub report
- addded in WOCATEGORY
- added in STATUS
- chose Select Expert and chose {Status} =
"Closed"
- Chose STATUS and selected that field and chose
the sigma button to sum that field
Added a sub report
- addded in WOCATEGORY
- added in STATUS
- chose Select Expert and chose {Status} =
"OPEN"
- Chose STATUS and selected that field and chose
the sigma button to sum that field
What i end up with is list of all my departments with no count, status of closed with not count and a status of open whit a count of 1?
I need to list all the differet types of Work Orders not just open and closed as well...?
Thanks for you help!
liked are a few photos that might help describe what is above.
Preview
Design
This is what worked for me with some help..
the insert summary button (Sigma button) and
pick the field as WorkerID
Type as DistinctCount
location = Group 1 (repeat for group 2).
This will insert a summary field into each group footer that you select. You can drag it into the header group header.

Merge data inside group Crystal Reports

I have a Crystal Report setup in my WPF Application. The report is grouping data based on VENDOR NAME field as shown in attached image. Now what i want is to show data inside a group only once.
I mean as in first group TOYOTA HOUSE the Vendor name is repeating although other column values are different. i want is under this group just show this record once and for other columns ADD/sum their values and show. I know i can do that in SQL query but can i do this in crystal report ?
Instead of showing in the details section add it to the group footer section.
suppress details section
and add totals in group footer

Jasper Report with more than one page

I'm currently using the report to print out the information of all the employees using the same format.
For example, here is the employee table in my database.
EmployeeID NAME AGE
----------------------
1 Tom 28
2 John 30
3 Tony 32
I just want to print out the information of the employees using the same format whenever there is other employees in the table. (first employee in first page, second in the second page.....)
Is there any way like that?
You can use PageBreak for each row so you can have a page
To implement this solution:
add the table component to your report
open the DataSet associated with this report and add to it the Group
set Group expression to
(int)($V{REPORT_COUNT} - 1)
check 'Start on a new page' property
see the link for more detail
http://community.jaspersoft.com/wiki/ireport-how-introduce-page-break-after-pre-defined-number-rows-table-component

How to display a report by Department wise

How to display a report by Department wise
Using Crystal Report 8.5
ID Name Department
001 raja IT
002 Vijay IT
003 Ram CSE
So on...
Display an Each Page by Department wise.
Once IT Department is completed then go to new page and display CSE Department, like that I need.
How to make in crystal report?
Like others have said. Create a group for the Department field. Go to the section expert for the group footer, enter this into the "New Page After" formula.
not onlastrecord
this will prevent the blank last page.
Insert -> Group -> Department.
Once you have a group section, right click on it. It should show you checkboxes on right side which should have an option which could be "print on new page".
See if that helps.
use sql group by department
Add group in the crystal report or use group by in the Sql query like that is is possible
and set every group comes in the new page in th section expert->select group section and set new page after.

crystal report total

suppose if i have many locations like L!,L2,L3 etc
each location hasAmount column with many records
how
can i totl the amount of each location in Crystal report
You need to create a Group for the Location, and then add a total field for SUM of Amount.
If you need me to explan the steps for you, please feel free to ask.
On the menu click Report and then
Group Expert.
A new window will pop up called
Group Expert with 2 boxes (Available Fields and Group By) and
buttons to move fields from left to
right.
Move the Location Field to the Group
By box and click OK.
Now you report should show a Group
Header 1 containing a field *Group1 Name* and Group Footer 1 which should be blank.
Now on the menu click Insert and
Summary. You should see a new window called Insert Summary.
In the Choose the field to
Summarize, change the field to the required Amount field to be summed.
Change the Calculate this summary
from Maximum to to Sum.
Change the Summary Location from
Grand Total(Report Footer) to Group #1 and click OK.
That should be about it. Now you can play around with the formatting as required.