Print Page | Close Window

Groups and sorting

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=21422
Printed Date: 05 May 2024 at 6:47am


Topic: Groups and sorting
Posted By: chadbrewyet
Subject: Groups and sorting
Date Posted: 08 Apr 2015 at 9:37am
I'm trying to set up a report to send to our technicians on a daily basis. The report will show them their time logs for that day.I have the report displaying all the information I want correctly but I'm having trouble sorting the entries the way I want.

So, each tech will work their jobs based on their service orders and each service order will have multiple time logs. In order to reduce confusion, I only want to display the earliest start time and the latest end time for all time logs on a given service order. For example, a service order has a one time log from 8:30-9:00 and another from 9:00-10:00 and the line would read like:

SO #   Customer   Start Time    End Time
12345 ABC Co.       8:30        10:00

I've set up a group on the service order number, suppressed the details, and put my fields in the group footer. Like I said, it shows all of the information correctly. However, service orders are not necessarily worked in numerical order. So, a service order with a higher number may have a start time earlier than a previous service order which causes the report to sort on the service order number and not the start time. I'd like to sort the records based on the start time of the time logs and not the service order number.

Is it possible to still group by the service order but sort based on the start time of the time logs? Is there a better way to achieve this?




Replies:
Posted By: DBlank
Date Posted: 08 Apr 2015 at 11:57am

in the SO# group place a summary as the minimum on the start time field

in the group sort expert use that min value to sort the groups
if you do not already have a grouping on the technician you may need to add that as a higher level group than the SO# group


Posted By: chadbrewyet
Date Posted: 09 Apr 2015 at 3:59am
Hot damn! That did it.

Thanks.

And I did do a group on the techs initially but I won't need to in the end since the report will be selected for a particular tech and only that tech.

Thanks again. I love this place!!!



Print Page | Close Window