How to hide a column when value is 0 which uses column grouping
Options
<p>Hi ,</p>
<p> </p>
<p> I have a report which uses column grouping.I need to hide a column when value is 0.</p>
<p> </p>
<p>I have attached sample report.</p>
<p> </p>
<p>In this,column B is splitted by column grouping as B1,B2,B3,B4.The row for B column is aggregation.</p>
<p>I used labels instead of crosstab to split B column.but i can't hide a column when no value for any column of B..B has all 4(B1,B2,B3,B4) value on some scenario & has any 2(B2,B3) or 3 (B1,B3,B4) value on other scenario.How to hide a column when no value ?.I tried visibility functionality to hide a column,but it doesnot work for me.Is any other option to solve that?</p>
<p> </p>
<p> </p>
<p>Thanks,</p>
<p>Emy</p>
<p> </p>
<p> I have a report which uses column grouping.I need to hide a column when value is 0.</p>
<p> </p>
<p>I have attached sample report.</p>
<p> </p>
<p>In this,column B is splitted by column grouping as B1,B2,B3,B4.The row for B column is aggregation.</p>
<p>I used labels instead of crosstab to split B column.but i can't hide a column when no value for any column of B..B has all 4(B1,B2,B3,B4) value on some scenario & has any 2(B2,B3) or 3 (B1,B3,B4) value on other scenario.How to hide a column when no value ?.I tried visibility functionality to hide a column,but it doesnot work for me.Is any other option to solve that?</p>
<p> </p>
<p> </p>
<p>Thanks,</p>
<p>Emy</p>
0
Comments
-
<p>You can actually use a JS function along with the visibility property.. Something like this on selection of the column that you wish to hide.. Suppose i wanted to hide Column B2, i would use something like this as the function..</p>
<p> </p>
<p>if(params["B1"].value==2){</p>
<p> true;</p>
<p>}else{</p>
<p> false;</p>
<p>}</p>
<p> </p>
<p>Hope it helps..</p>
0 -
<p>Hi ,</p>
<p> </p>
<p> Thanks for your reply.But it does not work for me.</p>
<div> </div>
<div>
<p>For Eg, I need to hide "column 2" in that rows having no data.</p>
<p> </p>
<p><span style="margin:0px;color:rgb(0,0,139);">Column</span><span style="margin:0px;color:rgb(0,0,0);"> </span><span style="margin:0px;color:rgb(128,0,0);">1</span><span style="margin:0px;color:rgb(0,0,0);"> </span><span style="margin:0px;color:rgb(0,0,139);">Column</span><span style="margin:0px;color:rgb(0,0,0);"> </span><span style="margin:0px;color:rgb(128,0,0);">2</span><span style="margin:0px;color:rgb(0,0,0);"> </span><span style="margin:0px;color:rgb(0,0,139);">Column</span><span style="margin:0px;color:rgb(0,0,0);"> </span><span style="margin:0px;color:rgb(128,0,0);">3</span><span style="margin:0px;color:rgb(0,0,0);"> </span><span style="margin:0px;color:rgb(0,0,139);">Column</span><span style="margin:0px;color:rgb(0,0,0);"> </span><span style="margin:0px;color:rgb(128,0,0);">4</span></p>
<p><span style="margin:0px;color:rgb(128,0,0);"> 10 13 15</span></p>
<p><span style="margin:0px;color:rgb(128,0,0);"> 23 13 19</span></p>
<p> </p>
<div>At the same time,I need to show "Column 2" when there is data</div>
<div>
<p> </p>
<p><span style="margin:0px;color:rgb(0,0,139);">Column</span><span style="margin:0px;color:rgb(0,0,0);"> </span><span style="margin:0px;color:rgb(128,0,0);">1</span><span style="margin:0px;color:rgb(0,0,0);"> </span><span style="margin:0px;color:rgb(0,0,139);">Column</span><span style="margin:0px;color:rgb(0,0,0);"> </span><span style="margin:0px;color:rgb(128,0,0);">2</span><span style="margin:0px;color:rgb(0,0,0);"> </span><span style="margin:0px;color:rgb(0,0,139);">Column</span><span style="margin:0px;color:rgb(0,0,0);"> </span><span style="margin:0px;color:rgb(128,0,0);">3</span><span style="margin:0px;color:rgb(0,0,0);"> </span><span style="margin:0px;color:rgb(0,0,139);">Column</span><span style="margin:0px;color:rgb(0,0,0);"> </span><span style="margin:0px;color:rgb(128,0,0);">4</span></p>
<p><span style="margin:0px;color:rgb(128,0,0);"> 15 36 5</span></p>
<p><span style="margin:0px;color:rgb(128,0,0);">2 71 53 9</span></p>
</div>
</div>
<p> </p>
<p> </p>
<p>Regards,</p>
<p>Emy</p>
0 -
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Hi Emy,</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> </p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">To hide a column in a table component, you can add this script to your report on the <strong>onPrepare </strong>Event of the table</p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> </p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"><strong><span style="color:rgb(127,0,85);"><span style="font-family:consolas;"><span style="font-size:10pt;">if</span></span></span></strong><span style="color:rgb(0,0,0);"><span style="font-family:consolas;"><span style="font-size:10pt;"> (<my condition></span></span></span><span style="color:rgb(0,0,0);"><span style="font-family:consolas;"><span style="font-size:10pt;">){</span></span></span></p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> <strong><span style="color:rgb(127,0,85);"><span style="font-family:consolas;"><span style="font-size:10pt;">this</span></span></span></strong><span style="color:rgb(0,0,0);"><span style="font-family:consolas;"><span style="font-size:10pt;">.getColumn(1).getStyle().display = </span></span></span><span style="color:rgb(42,0,255);"><span style="font-family:consolas;"><span style="font-size:10pt;">"none"</span></span></span><span style="color:rgb(0,0,0);"><span style="font-family:consolas;"><span style="font-size:10pt;">;</span></span></span></p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"><span style="color:rgb(0,0,0);"><span style="font-family:consolas;"><span style="font-size:10pt;">}</span></span></span></p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;"> </p>
<p style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Your condition can be for instance the count of not null value of the column 2. If this value is 0 (= only null or no value), you hide the column. Of course, this can be applied for any column of your table</p>
Warning No formatter is installed for the format ipb0
Categories
- All Categories
- 111 Developer Announcements
- 49 Articles
- 102 General Questions
- 123 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 898 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 124 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 1 XM Fax