Count Unique Values
Is there any (easy) way to count unique values
in a report. For example, suppose I have an
order report grouped by price range. I would
like to have a count of unique customers Ids
per group as well as for the entire report
(note that a customer can show up in more
than one price group). Thanks.
in a report. For example, suppose I have an
order report grouped by price range. I would
like to have a count of unique customers Ids
per group as well as for the entire report
(note that a customer can show up in more
than one price group). Thanks.
This discussion has been closed.
Comments
There are two ways you could do this. The easiest way would be to create
another dataset that counts each distinct customer id, and link it to your
existing dataset for use within your report. If you wish to perform this
task inside Delphi and ReportBuilder, you would need to create a count
variable and keep track of each unique customer ID in a list object such as
a TList or TStringList. Then you could loop through these values, count the
unique ones and group by that in your report.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com