Print Page | Close Window

Group sorting Cross-Tabs

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=5806
Printed Date: 08 May 2024 at 4:16am


Topic: Group sorting Cross-Tabs
Posted By: appoooh
Subject: Group sorting Cross-Tabs
Date Posted: 18 Mar 2009 at 3:08am
Dear all,

I have simple Cross-Tab report which includes one row: Currency, no columns, and a single summarized field: Sum(Delta).  Sum(Delta) can evaluate to a negative or a positive number .

I want to perform a Top N group sort by the absolute value of Sum(Delta), i.e. Abs(Sum(Delta)) but of course I'm restricted to group sorting by my single summarized field Sum(Delta).  So my report looks like this:

EUR    1.7
CAD    0.2
JPY    -45.9
USA    -121.2

whereas I want it to look like this:

USA    -121.2
JPY    -45.9
EUR    1.7
CAD    0.2

If I create a formula field for Abs(Delta), add a summarized field that computes Sum(Abs(Delta)) and then group sort on this, ordering for the report is still wrong because of course Sum(Abs(n)) is not the same as Abs(Sum(n)).

The version of Crystal Reports that comes with VS 2005 does not allow you to group sort by a custom function but is there a workaround that will allow me to sort my cross-tab report by Abs(Sum(Delta))?

Cheers,
David



Print Page | Close Window