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

function Previous does not work when more than two records are same

Status
Not open for further replies.

yehong

Programmer
Sep 22, 2003
291
US
CR8.5.
I have two fields on one section of the report. Date and Amount.
example data:
01/02/02 $34.00
01/09/02 $24.00
12/12/02 $24.00
01/01/03 $55.00
06/01/03 $34.00
Now I have used Previous function on amount field and supressed duplicate amounts conditionaly.
{table.Amount}=Previous({table.Amount})
This function supresses one record where amount is $24.00, but does not supress one line of amount $34.00.
Is there anything else that also needs to be added to be able to show only distinct amounts in this section? Also what if $34.00 is more than two times or three times? Will Previous function still work?
any idea is highly appreciated.
 
Change your sort to amount and then date
 
It worked perfectly. But Date is also required to be shown in asc sort order first then Amount.
What should I do?
 
I also tried this. Sort first by Amount then Sort Desc by Date and so far it looks ok. It shows dates in ASC order. Not sure if it will work in all cases.
 
The "previous" function refers to only the previous (single) record, not "all the previous records" so ordering is important when using this function.

Lisa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top