Print Page | Close Window

DisctinctCount Down

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Tips and Tricks
Forum Discription: Have you learned some great tricks to share with the group? Post them here!
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=20834
Printed Date: 04 May 2024 at 3:09pm


Topic: DisctinctCount Down
Posted By: PStaires
Subject: DisctinctCount Down
Date Posted: 24 Jun 2014 at 11:24am
I have a problem coming up with the formula to count down the distinct records in a list. This is a truck route with the orders listed and some have more than 1 order but I need a record to show the stop.
eg.
SHIPTO   ORDERNO   STOPCOUNT
ABC Co. Order 101 Stop 3
ABC Co. Order 102 Stop 3
MNO Co. Order 103 Stop 2
XYZ Co. Order 104 Stop 1
XYZ Co. Order 105 Stop 1

DistinctCount(SHIPTO) gives me the 3 but I need the countdown to perform in the list.

Ideas?

Paul


-------------
Paul



Replies:
Posted By: PStaires
Date Posted: 24 Jun 2014 at 11:36am
I suddenly thought of RunningTotal fields, BAM this is it.
DistinctCount({SHIP_TO.NAME}) -{#StopRunningTotal} +1

-------------
Paul


Posted By: PStaires
Date Posted: 24 Jun 2014 at 11:37am


-------------
Paul



Print Page | Close Window