Print Page | Close Window

Distinct count plus 1?

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
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=1429
Printed Date: 16 May 2024 at 10:25pm


Topic: Distinct count plus 1?
Posted By: weered1
Subject: Distinct count plus 1?
Date Posted: 02 Oct 2007 at 7:52am

I have noticed that my distinctcounts always equal distinctcount plus 1. When the count should be 40, it's 41. I have no idea why...I have over 50 distinctcounts on my report and this is happening for each.

Has anyone ever had this happen, and if so, is there a way around it?
 
I have created a formula that does a distinctcount(field)-1 and this makes the count correct, but when I have to put the count directly on my report, I can't get around it adding 1 every time.
 
Thanks for your help to this strange problem.



Replies:
Posted By: jkwrpc
Date Posted: 06 Oct 2007 at 9:58am
I am not sure if this is related. But if you have groupings on your report and depending how  your counts are configured CR can add one more pass to the group.  It might be adding that to your counter. If you have groupings think through how CR makes passes to generate the report data, look at your groups, and see where to to place the counter.
 
I have encountered this at times when creating manual running totals on data fields. Its a different problem than you report, but might have the same cause and solution.
 
Regards,
 
John W.
http://www.CustomReportWriters.net - www.CustomReportWriters.net



Print Page | Close Window