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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to average costs & then remove duplicates in Crystal

Status
Not open for further replies.

Pam001

Technical User
Oct 31, 2018
1
US
Hello everyone,
I'm brand new to the forum and have a very basic question for Crystal wizards out there!
I'm using Version 14.2.5.2618 (probably old). I have a very basic report using only 2 tables. In the attached example, the field I'm trying to work with is the Part ID field. The unit price is from a table from purchasing and the rest of the fields are from the Part table.
What I'd like to show is AVERAGE unit price and then eliminate the duplicates. What's showing is every single purchase order for that particular part.
Is there a way to do this? I'm a novice at Crystal, so please be kind! :)

Thanks in advance for any help.
 
 https://files.engineering.com/getfile.aspx?folder=695ce662-d505-4504-95ec-783d283da683&file=Capture.PNG
Your example doesn’t help much since the only field that appears to be unique is the price field. It looks like you are showing groups, but you aren’t showing the field that you are grouping on. I’m assuming that the part id is the left-most field.

Let’s say that you are grouping on vendor. Then are you saying that the “duplicates” within each vendor should not contribute to the average? One way of doing this would then be to insert a running total that does an average of price, evaluate on change of group (vendor) and resets never. Place this in then report footer (assumes the report is for one part only.

If the report shows multiple parts (e.g., a group #1 on part ID, and a group#2 on vendor, then place the running total in the group #1 footer (will not work in a header) and change the resets to “on change of group” (Part ID).

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top