Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
How show hidden table columns using interactivity viewer
suresh@anumolu
<p>Hi,</p>
<p> </p>
<p>Is there any way can i access the hidden table columns when enable Interactivity -> Show hidden columns? </p>
<p>In the attached design file, Last name column has been hidden during the design time. But when i run the report and try to display the hidden column, it throws a msg saying there is no hidden columns. </p>
<p> </p>
<p>Any one has any idea how to enable this functionality?</p>
<p> </p>
<p>Thanks for your help.</p>
<p> </p>
<p>Thanks</p>
<p>Suresh</p>
Find more posts tagged with
Comments
pricher
<p>Hi,</p>
<p> </p>
<p>I know it's a bit counter intuitive, but if you want to hide a column and make it available in Interactive Viewer, you cannot use the Visibility property of the column. You need to set the Section --> Display property of the column to No Display in the Advanced Properties, as shown here:</p>
<p>
suresh@anumolu
<p>Thanks Pierre Richer. Your approach works perfect.</p>
<p>On a different report i am using the following approach to hide inside the DEAPI. </p>
<p> </p>
<p>hiddenColumn.getStyle().display = "none";</p>
<p> </p>
<p>Is it the same display property or is there anyother way can i access this advanced->section->display property from DEAPI?</p>
pricher
<p>The following code in the beforeFactory will hide the 3rd column in your table. See comments in the code:</p>
<pre class="_prettyXprint _lang-">
// Get the handle to the table named "mytable"
th = reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("mytable");
// Get the handle to the table's comments property. If null, it means this is the initial display of the table and we can proceed hiding the column
flag = th.getPropertyHandle("comments").getValue()
//With Interactive Viewing, the beforeFactory is called each time columns are shown or hidden.
// We must ensure to hide the column through code only the first time the table is displayed
if (flag == null) {
for ( var i = 0; i < th.getColumns().getCount(); i++ ) {
ch = th.getColumns().get(i);
ph = ch.getPropertyHandle("display");
if (i==2) { // This will hide the 3rd column
ph.setValue("none");
}
th.setProperty("comments","****") // Dummy comment
}
}
</pre>
<p>Sample report attached.</p>
<p> </p>
<p>P.</p>
suresh@anumolu
<p>That's perfect. Thanks for your help on this Pierre Richer..</p>