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)
Hide Grid based on Data Value
sadiqkhoja
<p>I have a dataset which returns only one row. I want to hide a grid in the report based on the value of a particular field. How to do that? I know visibility of grid row can be set but in expression builder of grid row, datarow value is not accessible. :S</p><p> </p><p>I have attached the screenshot of what exactly I want to achieve
Find more posts tagged with
Comments
sadiqkhoja
<p>Is it really a difficult question?</p>
XFabien
<p>hello,</p><p> </p><p>when you select the grid, you can bind the dataset in the 'binding' tab.</p><p> </p><p>hope this help.</p>
kclark
<p>From the onCreate() of the data element you can use a script like this</p><pre class="_prettyXprint">if(this.value == /*some value*/) { reportContext.getDesignHandle().findElement("mygrid").getDetail( ).get( 0 ).drop();}</pre><p>You'll need to make sure your table is named, in this example my grid is named "mygrid"</p>
superbeda
<p>Hello I tried to insert the code but It doesn't works.</p>
<p>I tried also to insert the following code into beforeFactory event but my grid is drop also in html format:</p>
<p> </p>
<p>var tGrid = reportContext.getReportRunnable().designHandle.getDesignHandle().findElement("grid1");<br><br>
if (reportContext.getOutputFormat() != 'html'){<br>
tGrid.drop();<br>
}</p>