Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Only pull first record in a group

Status
Not open for further replies.

csmalls

Technical User
Aug 14, 2011
4
US
I have been fighting with Crystal Reports all morning and I think I'm defeated.
I have a report that pulls in data from several tables.
Our products have customer product ids and it is possible for the same product to have multiple customer ids. The issue is that the product is getting pulled in to the report multiple times causing errors in the totals.
For example:
Our part #10045 has two customer product ids for the same customer - 2130 and 0504. It is therefore getting pulled in twice along with all the sales date that goes with it.
It doesn't matter to me which customer id gets pulled but I can't seem to find a way to only show it once.
Here is an example of the fields on the report:
As you can see the total sales will wind up being 380.00, but in reality should only be 190.00

Report:
Customer ID Order # Product ID Total
2130 261417 10045 95.00
0504 261417 10045 95.00
2130 261787 10045 95.00
0504 261787 10045 95.00
Total Sales 380.00

Any help is appreciated
 
You could try creating a group on ProductID and put all your fields in the group footer. It should work for you.
 
Sorry, you said first record so you should put your fields in the group HEADER not FOOTER.
 
To display data do as suggested above.

To over come the over count use a Running Total insted of a summary. In the evaluate section check the change of field radio button and select Order # field.

In reset select Product ID for that group. If you need a report total create another RT but on this one leave reset as never.

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top