COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Tsunami on 23 Feb 2011 10:20:04 AM

Title: Conditional formating for drill through
Post by: Tsunami on 23 Feb 2011 10:20:04 AM
I have a report that currently has a drill through for Invoice ID.  However, I'd like the hyperlinks to only be operational for Invoice IDs like 'ER%'.  Is this possible?  If so, where should it be done? 

I currently have the drill through set on Invoice ID but all the ID's are highlighted even when there isn't an associated report.

Thanks!
Title: Re: Conditional formating for drill through
Post by: Lynn on 23 Feb 2011 11:05:25 AM
I'm not entirely sure, but my first thought is to have two data items for Invoice ID. One for those like ER% and another for those that don't begin with ER. Set these to conditionally render as appropriate and put the drill through only on the ER data item.

BeginsWithER data item set to render only when <> 'Do Not Render' and with drill through set:

if ( [Invoice ID] like 'ER%' )
then ( [Invoice ID] )
else ( 'Do Not Render')


NotBeginWithER data item set to render only when <> 'Do Not Render':

if ( [Invoice ID] not like 'ER%' )
then ( 'Do Not Render' )
else ( [Invoice ID])



Title: Re: Conditional formating for drill through
Post by: PRIT AMRIT on 23 Feb 2011 09:30:16 PM
As Lynn suggested, this is how we can get it done.

However we had done it in a slightly different way with the use of a conditional block.
You may Unlock your report. Drag a Conditional Block object and drop inside [Invoice ID] Column.
Create a Boolean Variable [Invoice ID] like 'ER%' YES or NO
Assign it to the Conditional Block
If YES, Drag the [Invoice ID] Item and put it inside your conditional block. Apply Drill Through
If No, Drag the [Invoice ID] Item and put it inside your conditional block.

It should do.

Thanks
Prit
Title: Re: Conditional formating for drill through
Post by: Tsunami on 24 Feb 2011 09:16:16 AM
Thanks to the both of you for your advice.  I wasn't entirely sure about how/where to 'conditionally render' so I went with PRIT's advice.  Worked great!