Solved

Sorting on the first column of a crosstab

Posted on 2009-05-13
2
329 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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 …
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…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

914 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now