[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Crystal Reporting XI - how to have Sort "override" Grouping

Posted on 2009-07-01
10
Medium Priority
?
417 Views
Last Modified: 2012-05-07
I have a report that is grouped by Job Number.

The report only display header type of data for each Job Number so I don't need to do any sorting of records within the group since there is only header type data.

What I need to do is have the overall report sort by a field within this header data that happens to be a Date field. This Date field is displayed in the group footer.

Is this possible?  When I go into Sort Expert, it has my Job Number grouping as the primary sort and will not let me put this Date field above it to be the primary sort??

thanks

0
Comment
Question by:JMO9966
[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
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 5

Accepted Solution

by:
jgbreeden earned 400 total points
ID: 24756190
Why do you have it grouped on Job Number, are there child records or just multiple occurrences of each job in the main table?  If it is a child table, you could use a sub report & pass the job number to the sub, then remove the grouping in the main report.  If it is multiple records in the main table, I don't think you can override the grouping in the sort.
0
 
LVL 101

Assisted Solution

by:mlmcc
mlmcc earned 1200 total points
ID: 24759487
When you group a report, Crystal automatically makes that the first sort for the report.  That is how it groups the records.

You can then add secondary sorts.

It is possible to sort the groups by another field through the GROUP SORT EXPERT>  You must have a summary function on the field you want to use.  For instance on your report if the last record in a group has the max date you could add a summary Maximum({DateField}) then use the GROUP SORT EXPERT (under the REPORT menu) to sort the groups on the max date.

mlmcc
0
 
LVL 35

Assisted Solution

by:James0628
James0628 earned 400 total points
ID: 24769197
If you simply want to sort by another field before a group, simply create a group on that field.  Suppress the new group header and footer and you've essentially sorted the original group(s) by the new field.  Note that if this is a date/datetime field, CR will default to grouping "for each week".  If you want the report grouped (sorted) by each day, you'll need to go into the group options and change that setting.

 James
0
What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

 

Author Comment

by:JMO9966
ID: 24814569
Go thoughts guys, but let me add more details.

I have a summary in my group footer (grouping=by Job Number) that tells me the maximum value for the left join table.  The summary field tells me the max sequence (integer) in this table for that particular job number.  I then use this formula to display the date for the max sequence row.

If {Job_Op.Sequence}={@Max_sequence} Then
{Job_Op.Sched_End}

Keep in mind, the max sequence may not necessarily have the max date value, that's why I had to go this route since I really need the date for the max sequence not necessarily the max date.

I attempt to do a grouping on this formula field, but it does not appear in my list as objects I can group by, most likely because the formula is based on a summary field.

Please give me your thoughts. I'm increasing points to 500 now.
0
 
LVL 101

Assisted Solution

by:mlmcc
mlmcc earned 1200 total points
ID: 24815034
I don't think you will be able to group on that formua.

What is the @Max_Sequence formula?

mlmcc
0
 

Author Comment

by:JMO9966
ID: 24815229
Maximum ({Job_Operation_2.Sequence}, {OP_ActiveJobs_TTX.Job})

Is it true that you cannot group or sort by summary fields??

Any clever workaround without re-doing the entire report would be good.

thanks
0
 

Author Comment

by:JMO9966
ID: 24815236
Sorry,

Maximum ({Job_Op.Sequence}, {OP_ActiveJobs_TTX.Job})
0
 
LVL 101

Assisted Solution

by:mlmcc
mlmcc earned 1200 total points
ID: 24815313
Maximum is a PrintTime formula and it isn't calculated until the grouping is done.  

There is probably a way around this issue but it will involve using subreports.

Does your report have a subreport already?

mlmcc
0
 

Author Closing Comment

by:JMO9966
ID: 31598833
Thanks guys,

I added a grouping for a Date field in a Left Join table and changed the setting to Daily and moved this grouping above Job grouping and suppressed the new grouping and it looks good!
0
 
LVL 35

Expert Comment

by:James0628
ID: 24856616
I'm glad that worked out for you.  I couldn't see any way to get the Maximum thing to work.

 James
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

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…
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

656 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