How to get multiple variations of counts of the same data set?

I have a set of Customer Survey data, the status field tells me if the survey was ignored or responded to, I need the total number of surveys setn and the total responded to.

I have the total sent, but can not figure out how to get the second set.

I tryed a sub report (this gives ne the option of using w where clause) but i do not know how to pass the date perameter from the main report to the sub.

So I am asking for help to see if this can be done using a query statement in the mani report and not using a subreport.

Thanks

RT

rtucci's picture
15
Joined: Oct 26 2012 - 8:55am
Last seen: 8 years 9 months ago

1 Answer:

Hi RT,

create a new Variable with the following settings:

Name: MyCounter

Calculation: Nothing

Reset: Report

Increment: None

Variable Expression: ($F{<responded-or-not-boolean-field-value>} == true ? $V{MyCounter} + 1 : $V{MyCounter}

Initial Value: 0

that should do it. Another way of defining the variable would be:

Name: MyCounter

Calculation: Count

Reset: Report

Increment: None

Variable Expression: ($F{<responded-or-not-boolean-field-value>} == true ? 1 : null

Initial Value: 0

This approach uses the fact, that the count-calculation function only count values different from null

Cheers, Thomas

http://www.thomaszimmer.net

Thomas Zimmer's picture
Joined: Oct 2 2012 - 1:35am
Last seen: 5 days 19 hours ago
Feedback
randomness