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!

Ordering the data in the details section

Status
Not open for further replies.

maas2011

Programmer
Dec 28, 2011
16
BH
Hello All,

I need your help in ordering the data in the details section.

I am grouping the data by category, the below is sample:
Titles: Deal_No Amount Value Date Maturity Date
Group No.1:FX
Details: 123 1000 11-Dec-1998 12-Dec-1998
124 2000 15-Nov-2001 1-Jan-2002
126 3000 12-Dec-1998 18-Dec-1998

My requirement is that I want to order the deals based on that the value date of the next deal should be equal to maturity date of the previous deal (or in other words the maturity date of the first deal should equal the value date of the next deal) and the result should be:

Titles: Deal_No Amount Value Date Maturity Date
Group No.1:FX
Details: 123 1000 11-Dec-1998 12-Dec-1998
126 3000 12-Dec-1998 18-Dec-1998
124 2000 15-Nov-2001 1-Jan-2002
Is there is a way to do that?
 
Create a formula field that combines the two dates in sortable order. Something like
Code:
Totext({Value Date}, "yyyyMMdd") & "/" &   Totext({Maturity Date}, "yyyyMMdd")
Choose Report > Record Sort Expert and choose this as your sort field.

It helps to give your Crystal version - 8, 8.5, 9, 10, 11, 2008 or whatever. Methods sometimes change between versions, and higher versions have extra options. In this case, it probably makes no difference.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
Thanks Madwac For your help.

I am a little bit confused about your logic. Can you please explain more?

Will this formula sort the values based on that the maturity date of the first deal should equal the value date of the next deal?
 
It will give you value data plus maturity date, the order in the example you showed. If you want the relations between them, I think that's beyond Crystal

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
I think you just need to sort ascending by value date and then sort ascending by maturity date.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top