Page 1 of 1

Count Repeatable Values

Posted: Tue Oct 19, 2021 1:14 pm
by brjohnsmith
Hi, I need to count the values in a specific databand, but this value can be repeated some times.

Ex:

DataBand1
AAA
AAA
BBB
BBB
BBB

so, in the next DataBand, I need the following result.

AAA = 2
BBB = 3

How can I do it? I tried to use Count, Totals.Count, but noone of them gave me the correct result, the best result was the value 5 for both content.

thx.

Re: Count Repeatable Values

Posted: Tue Oct 19, 2021 2:15 pm
by Max Shamanov
Hello,

in that case, you can use grouping for the second band and on the GroupFooterBand use the following expression:
{datasourcename.col2} = {Count(Datadatasourcename2)}

Sample report in the attachment.

Thank you.

Re: Count Repeatable Values

Posted: Wed Oct 20, 2021 2:05 pm
by brjohnsmith
Hi Max,
thank you for the info and the answer, but I was not able to open the file after downloading it (if you can attach the screenshot, I would appreciate a lot). See the progress that I had so far.
I used GroupHeader, DataBand and GroupFooter - on this sequence. However, on Footer, the Count is correct, but I have only the last content (based on the example)
the content: AAA, BBB, not belong to the same datasource.
Ex:
BBB = 2
BBB = 3

it is not possible to get the value AAA for the first record, and BBB as the last record. Let me know if it is clear.
thx.

Re: Count Repeatable Values

Posted: Wed Oct 20, 2021 3:35 pm
by Max Shamanov
Hello,

I have attached 2 screenshots that show how the values can be calculated.

Thank you.