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!

Data Selection

Status
Not open for further replies.
Mar 2, 2006
14
CA
I have a report created in Crystal XI pulling from ODBC. The purpose of this report is to show the most recent transactions for each part made by a particular customer (customer name is the resord selection). Right now the data is grouped by part number. The max function is being used to select the most recent date. The problem is although it finds the most recent date for each part it is not showing the most recent shipped quantity, instead it shows the maximum. I cant seem to figure out how to make this work.

Thanks
 
An example of your data, your current output and expected output would go a long way in solving your problem.
 
For example my current report shows that the part 1416J39SS was most recently shipped on 14-MAR-06, which is correct. It is showing that a quantity of 1838 is being shipped for that date. This is incorrect, (should be 597)and is the quantity that was shipped for that part in Apr-2004. I believe it is showing that quantity because it is the maximumamount we have ever shipped in one order for that part to this customer.
 
Sounds like you have another maximum was created determine the greatest ship quantity for a part.

If the maximum date is listed on a group header, then simply insert the table.shipqty. Remove the maximum quantity from the report canvas.

 
You could either sort the date in descending order, and then do as kskid suggested, placing the fields in the group header, or you could go to report->selection formula->GROUP and enter:

{table.date} = maximum({table.date},{table.partno})

If you then need to do calculations on the quantity, you should use running totals, since the non-group selected records will still contribute to inserted summaries.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top