How to ignore duplicates in recordset of Crystal Reports
Say I have a result set with these values:
orderID typeofSale
A1 Sell
A1 Buy
B1 Sell
C1 Sell
The total number of orders here is 3, as A1 got divided. How can this be calculated in Crystal?
I tried looping through the orders with WhileReadingRecords; and maintaining the order ids read in an array, and then checking of the order id had already been read, thus not double counting. However, Crystal has an array limitati开发者_开发百科on of 1000 records only....
I've been struggling with this. For some reason, the prev report creator wants this value in the report header, making it all the more difficult.
You can use DistinctCount
In a formula you would do:
DistinctCount({Table.Yourfield})
Or from the menu Insert
> Summary
then choose the field you want summarize and select Distinct Count
from the Calculate this summary drop down.
精彩评论