If you are unable to create a new account, please email support@bspsoftware.com

 

Cognos Report Studio - Hide a filed based on data present in other filed.

Started by Hidayathulla, 08 Aug 2023 10:40:06 PM

Previous topic - Next topic

Hidayathulla

my  report contains Role & SubRole (Parent-child table relationship) showing one below the other.
I want to  suppressing the SubRole when it's matching exactly with Parent Role.
Expectation : when role description matches with the Sub role then the respective subrole row should not be shown.
I have tried different ways , but no luck as of now. please help me to achieve this.





cognostechie

Maybe use a hand written SQL to do this. I don't know the name of the tables/fields but you can find that out and replace them in this SQL



SELECT
  R1.ROLE_ID,
  R1.ROLE_DESCRIPTION,
  S1.SUBROLE_DESCRIPTION
FROM
(
SELECT
   ROLE_ID,
   ROLE_DESCRIPTION,
FROM ROLE_TABLE
) R1
LEFT OUTER JOIN
(
SELECT
   R.ROLE_ID
   R.ROLE_DESCRIPTION,
   S.SUBROLE_DESCRIPTION
FROM ROLE_TABLE R
INNER JOIN SUBROLE_TABLE S ON R.ROLE_ID = S.ROLE_ID
WHERE R.ROLE_DESCRIPTION <> S.SUBROLE_DESCRIPTION
) S1
ON R1.ROLE_ID = S1.ROLE_ID
 

MFGF

Quote from: Hidayathulla on 08 Aug 2023 10:40:06 PM
my  report contains Role & SubRole (Parent-child table relationship) showing one below the other.
I want to  suppressing the SubRole when it's matching exactly with Parent Role.
Expectation : when role description matches with the Sub role then the respective subrole row should not be shown.
I have tried different ways , but no luck as of now. please help me to achieve this.


I would use a conditional block for this. Include the SubRole in the block, and have the block hidden when the Role matches the SubRole.

Cheers!

MF.
Meep!

cognostechie

I think his requirement is to hide the subrole but display the role.

dougp

I question the vocabulary or implementation.  It is not possible for me to be my own child.