Solved

Sorting on the first column of a crosstab

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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

809 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