COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: CRudiger on 04 Apr 2016 01:36:07 PM

Title: Conditional Rendering Problem on Export
Post by: CRudiger on 04 Apr 2016 01:36:07 PM


Hopefully someone can point me in the right direction on this....

I am fairly new to Cognos, so please bare with me on my ignorance. I am utilizing conditional rendering techniques as described here - http://www.ibm.com/developerworks/data/library/cognos/reporting/dynamic_report_design/page570.html.

The report renders correctly when viewing in HTML but if I choose Excel as the export option, all of the unwanted column headers appear with blank data below them.

Is there a way to ensure that the export does not include the headers if not selected?

Here are details from my report, hopefully this helps.

ParamValue('Field Box 1') contains 'C1' - Is the variable as written.


case when ('C1' in (#promptmany('Field Box 1','varchar')#))
then([SQL1].[ITEM])
else null
end
  - is an example of the expression attached to each data item.

Thank you in advance.



Title: Re: Conditional Rendering Problem on Export
Post by: BigChris on 05 Apr 2016 02:00:35 AM
Can I just check - did you definitely apply the conditional rendering to the List Column? What you're describing sounds like it's been applied to the List Column Body.
Title: Re: Conditional Rendering Problem on Export
Post by: CRudiger on 05 Apr 2016 10:28:12 AM
BigChris, thanks for the reply!

Just to confirm, to apply the expression I clicked on the column and in the properties pane, I clicked the up arrow and selected "List Column" then in the Expression I inputted what I wrote earlier. I just checked and whether I click on the Header or the body of the column, the expression shows in the properties pane.


Do I do that correctly?
Title: Re: Conditional Rendering Problem on Export
Post by: afzaki7 on 07 Apr 2016 04:57:16 AM
Try this
1- unlock the list
2- drag a text item to your column header
3- change the TextItem from text to expression the write the condition you mentioned before  and give it a try