Crystal Reports sumif - crystal-reports

I need to do a sumif here.
Lets say I have the following data
EMPNAME TICKETS
Lindsey Abbott 102894
Lindsey Abbott 106402
Lindsey Abbott 105491
Alex Kenney 106337
Alex Kenney 106328
Alex Kenney 106338
The result would be like:
EMPNAME Count of Tickets
Lindsey Abbott 3
Alex Kenney 3
How do I do this in crystal reports? Please help me

Insert a group on EMPNAME
Insert a summary field on TICKETS; choose Count as the aggregator
Hide/suppress the Details section

Your best method depends on what other information you intend to use in your report. If there is a lot of other data, you'll want to research the use of Running Totals (a good starting point would be https://msdn.microsoft.com/en-US/library/ms227117(v=vs.80).aspx).
If all you are trying to do is provide a count per user, then use Group Expert and group by EMPNAME. Insert the field into the detail section of the report. Right click on the field and INSERT SUMMARY. Summarize the EMPNAME field, calculate by COUNT, and be sure to check "Add to all group Levels".
When you click ok, you'll see the count in the newly generated Group Footer. You can then simply move the EMPNAME field from the DETAIL Section to the Group Footer, shrink or hide the detail section, and you're good to go!

Related

Selectively showing groups in Crystal Reports

I have a report which displays information by group; I'd like to not show any group that doesn't have at least two items in it. Is there an easy way to do this?
Example:
Bob
3/1
4/3
Joe
3/2
3/7
3/9
Mark
5/9
James
John
8/17
9/2
Grouped on name, should not show Mark or James.
If your report is simplistic enough, you can get away with just suppressing the Group Header, Group Footer, and Details sections by using a summary function like count({table.somedate},{table.dudesname}) < 2. Note that the second parameter to a summary function has to be a field being used to group on.
Your mileage may vary with doing it this way. If you are displaying calculated summaries in the report footer, for example, it won't make sense to just suppress these groups as their data will still affect any report-level summary. The other problem you might run into is needing to use a distinct count on some field instead of just a count, depending on your table joins.
You could create a group-selection formula (Report | Selection Formula | Group...):
Count({table.field_to_count}, {table.grouped_field}) < 2

Merge rows of same values in jasper Repors Detail Band

My data contains same value for a particular column.
My requirement is to merge the data rows for that particular column alone in detail band.
Is it possible in jasper reports.
please help.
Thanks & Regards,
Prasanna
You can make another group, other than Detail and set the Group Expression to the same field you want.
For example, if I want to group on Country, and show Cities in each country. In "Country" Group Expression. I would write:
$F{countryField}

Crystal Reports XI Cross tab summarised field how to stop cell rows of the same value merging?

I have created a cross tab however if I have a firstname field it merges the rows together if there are two names which are the same. How do you get it to display the names in the each row. In the example below Sarah is not displayed twice as the cells are merged together.
Firstname Lastname
Judy Collins
Sarah Dane
Smith
Joe Dine
Mary Lane
It sounds like you grouped your crosstab on the first name only. I would recommend:
Make a new Formula (Call it "FullName")
In the formula, combine the first name and last name, e.g. something like {First Name}&{Last Name}
Edit your crosstab to group by the FullName formula instead.
Does this help?
EDIT
Based on your comment, I don't think your comment is with Crystal. You need a "unique ID" of some sort, a distinct number for each person. My original suggestion was trying to use the user's full name as a unique ID, but that won't work if your dataset is big enough to include multiple people with the same name. Does your dataset have any kind of unique ID? What is this crosstab trying to display? There might be a better way.

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?
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.

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.