开发者

How to ignore duplicates in recordset of Crystal Reports

开发者 https://www.devze.com 2023-03-12 16:28 出处:网络
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?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号