COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: ratnalein on 02 Jul 2013 09:05:30 AM

Title: Possible not to show some columns?
Post by: ratnalein on 02 Jul 2013 09:05:30 AM
Hallo everyone,

I have created a list report with 10 columns:

Date     Number of Dead People      Number of Alive People     Number of Sick People
------     ------------------------------      -----------------------------     ----------------------------


By creating a filter, I give the user to choose which kind of people they want to see, example:
"Sick People" is choosed:

Date     Number of Dead People      Number of Alive People     Number of Sick People
------     ------------------------------      -----------------------------     ----------------------------
01.01                    0                                           0                                    45674
02.01                    0                                           0                                        403


Is it possible to let the columns appearance depending to the filter the user choosed?  My ideal report for above example would be:

Date    Number of Sick People
------    ----------------------------
01.01                45674
02.01                    403

Thank you..

Regards,

Ratna   

Title: Re: Possible not to show some columns?
Post by: g.congnos on 02 Jul 2013 09:47:59 AM
Hi,

I don't think you can hide the column in a list.

If you use the crosstab instead of the list, you can do it using the suppression property.

Title: Re: Possible not to show some columns?
Post by: Lynn on 02 Jul 2013 11:27:05 AM
You can use a render variable to hide the columns in a list. You could also use an advanced conditional style.
Title: Re: Possible not to show some columns?
Post by: ratnalein on 03 Jul 2013 08:48:23 AM
Hallo Lynn and g.congnos,

thank you for the advice.  I tried to use the render variable, but it behaves very wierd:

Boolean Variable with this definition:
[Dim_ID] in '1'

[Hierarchy-Element].[ID] is definied in the filter, which can be selected by the report user.  In my case, I say: "if the user choose a particular ID, than take this ID.  If the user doesnt choose any ID, than assume all ID values as choosed" :

[Dim_ID] #promptmany('filter_id','varchar',' <> ' +sq('-'), ' in (','',')')#


It doesnt give me the correct hiding:
1.  If nothing is taken as filter(I tick nothing in the filter), it gives me all columns  --> this is correct
2.  If I tick a particular ID value, it gives me also all columns --> this is false

It is not easy to explain it without seeing the code.  I will just try to fix it.  The logic doesnt seem to work in my report.  I have done something wrong(I assume, the filter with promptmany is the problem). 

If you have any clues, please kindly comment.  Thank you.

Regards,

Ratna
Title: Re: Possible not to show some columns?
Post by: TheBrenda on 03 Jul 2013 09:05:06 AM
I followed this and it worked

http://www.ibm.com/developerworks/data/library/cognos/reporting/dynamic_report_design/page570.html

Title: Re: Possible not to show some columns?
Post by: ratnalein on 04 Jul 2013 03:13:58 AM
Hallo TheBrenda, Lynn, g.congnos,

thank your for your advices.  It worked finally  ;)

In my case, the clue was to define the render filter like this:

ParamDisplayValue('my_filter') contains 'my_ID_value'


Thank you..

Regards,

Ratna