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

Selecting data within a field

Status
Not open for further replies.

plec

Technical User
May 15, 2001
1
MU
Hi I'm new here, its the first time i've been on that site. It has been recommended to my by one of your members.
I am actually having a problem developping a report on crystal reports and i wanted to know whether what i am trying to do is possible or not;

E.g
I am using a field "date" which contains several date entries for each stock items.This is so as their accounting software keeps track of each purchasing date for each item. e.g if item 1 has been bought for the first time on 01.10.00
and then a new stock of item 1 is bought again in 05.06.01 it will be displayed as such;

Qty Description Cost Date
1 Item1 100 01.10.00
1 Item1 100 05.06.01
5 Item2 500 08.05.00
5 Item2 500 05.09.00
5 Item2 500 05.04.01

It will keep all the purchasing dates as shown above.
My problem is that 1 need to display only the last purchasing date only i.e in the example above 05.06.01 for item1 and 05.04.01 for item 2.I tried several formulaes but it would rather give me the last purchasing date for all the stock items instead of the last purchasing date for each seperate item.
Could you please help me to solve this problem out. If you don't understand my problem if it is not clearly defined, I am willing to give more examples and try to explain my problem again.

Regards patrice.
 
In insert menu, select "group", then select the description column, press OK. This adds group header 1 and group footer 1 in report. Again in Insert menu, select running total field, create a new runnung total field as date by selecting the date column and in "type of summary" select maximum, press OK. Then drag and drop this into the group footer which will show you the maximum value of date in group. I think this works.

Satya
 
Satya's idea will display the highest date, but not the record for the highest date. To display the last record only:

Insert a group on description
Sort the records by Date - Descending
Place all display fields on the Group Header
Hide the Details and Group Footer sections.

If you need Grand totals of the last record, you will need running totals that are set to "evaluate" on each group. Ken Hamady
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top