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

display simple group sort

Status
Not open for further replies.

mmwdmr

Technical User
Jan 10, 2002
119
US
I have the following "Aging" formula:

if CurrentDate - {RACCT.LASTPAYDATE} in [30 to 60 ] then
"30 to 60" else
if CurrentDate - {RACCT.LASTPAYDATE} in [61 to 90] then
"61 to 90" else
if CurrentDate - {RACCT.LASTPAYDATE} in [91 to 120] then
"91 to 120" else
if CurrentDate - {RACCT.LASTPAYDATE} > 121 or {RACCT.LASTPAYDATE} = date(0,0,0) then
"121 + "

When displayed on the report, the 121 + displays first, then the 30 to 60 then the 61 - 90 then the 91 to 120. It needs to ascend by days:

30 - 60
61 to 90
91 - 120
121 +
 
Hi,
Strings sort based on the ASCII value so 1 comes before 3.

Add another formula that returns a number and group by that and use your formula to create the Group name
Code:
@realsort
if CurrentDate - {RACCT.LASTPAYDATE} in [30 to 60 ] then 
1 else
if CurrentDate - {RACCT.LASTPAYDATE} in [61 to 90] then 
2 else
if CurrentDate - {RACCT.LASTPAYDATE} in [91 to 120] then
3 else
if CurrentDate - {RACCT.LASTPAYDATE} > 121 or {RACCT.LASTPAYDATE} = date(0,0,0)  then
4

Should give an idea of how to proceed...



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top