Solved

Sorting on the first column of a crosstab

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 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

14 Experts available now in Live!

Get 1:1 Help Now