COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: cogb on 14 Jun 2016 09:02:37 AM

Title: Can rows be conditionally rendered?
Post by: cogb on 14 Jun 2016 09:02:37 AM
Good morning:

I built a report where I was able to hide certain rows based on the selections the user makes on a prompt page.  I use a conditional style with the box type set to None if the condition is true.  However, when I tried to calculate totals on what was displayed, the result included the hidden rows.  Reading through the Report Studio documentation, I learned that this is by design, but with conditional rendering, even hidden rows will not be counted.  But, it seems that this functionality is intended for columns and not rows.  Am I right?

Is there another way that I can accurately count the number of displayed rows, while ignoring hidden rows?

I am by no means an expert at Report Studio.  So, I appreciate your expertise and help.

Thank you,
cogb
Title: Re: Can rows be conditionally rendered?
Post by: dougp on 14 Jun 2016 10:20:25 AM
The tool used to conditionally render a row is called a query filter.  If you want to display one thing and count another, you'll need two, different queries.
Title: Re: Can rows be conditionally rendered?
Post by: cogb on 14 Jun 2016 11:33:12 AM
dougp, thank you very much, it worked!  I misread a statement in the manual regarding the use of query filters.  I thought a case statement wouldn't work since it's essentially going to be placed in the where clause of the query being executed anyway.  But, it works and is the simplest solution to the issue I had.

Thanks again!   :)