Solved

Sorting on the first column of a crosstab

Posted on 2009-05-13
2
332 Views
Last Modified: 2012-05-06
I am using a cross tab in a reports as follows.

Column (datefield) by day
Rows - resourcename
Summarized fields - this is a count

The report looks something like the following

                      12/05/2009    11/05/2009    10/05/2009       Total
Mark Smith           3                       2                     2                 7
Mark Jones           23                     3                     9               35
Mark Cross            1                      1                     46             48

I now need to sort the crosstab, not by the total column but always be the first column, which contains
the previous days data, the reult would be

                      12/05/2009    11/05/2009    10/05/2009       Total
Mark Jones           23                     3                     9               35
Mark Smith           3                       2                     2                 7
Mark Cross            1                      1                     46             48

I am using Crystal Reports XI

Does anybody know how this can be done?

Thanks
0
Comment
Question by:halifaxman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 24374976
Yes it is.

Add a formula to the report
If ({DateField} = CurrentDate-1) then
    {AmountField}
else
    0

Add a group to the report on the NameField

Put the formula in the detail section
Right click the formula field
Click INSERT --> SUMMARY
Make it a sum
Put it in the group footer

Right click a row label in the crosstab
Click ROW OPTIONS --> ROW GROUP SORT OPTIONS
Set the dropdown to ALL
Choose the summary field
Set orfer to descending

mlmcc
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 24374990
If you want you can then delete the formula and the summary field from the report
You can delete the group header label
You can suppress the sectiions

mlmcc
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question