Solved

Sorting on the first column of a crosstab

Posted on 2009-05-13
2
331 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
  • 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying 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…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

856 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