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 cell in cross tab with report parameter
Ka Lai
<div>Hello</div>
<div> </div>
<div>I have a cross tab. In one cell there is a grid. For some customer I need to hide one cell of it. I use a simple example to explain, see attachment. In this example I wan't to hide "state" if the report parameter "HideCell" is 1.</div>
<div> </div>
<div>Have some one an idea?</div>
<div> </div>
<div>Thanks.</div>
Find more posts tagged with
Comments
mwilliams
The best way to do it might be to just create a second crosstab, then drop the unneeded one based on the parameter. To drop an element, you simply need to name it in the property editor, then in the beforeFactory method, do something like:<br><br>reportContext.getDesignHandle().findElement("yourElement").drop()
Ka Lai
<p>Thanks Michael, it works great.</p>
<p> </p>
<p>I add the follow code to beforeFactory method:</p>
<pre class="_prettyXprint _lang-js">
if(params["HideCell"].value == 1){
reportContext.getDesignHandle().findElement("SalesWithState").drop();
}else{
reportContext.getDesignHandle().findElement("SalesWithoutState").drop();
}
</pre>
<p>SalesWithState and SalesWithoutState are the two cross tab I created.</p>
mwilliams
Great! Glad I could help!
RRK
<p>Hi Michael,</p>
<p> </p>
<p>Could you please post an example to name a cell and then hide the same using beforeFactory method?</p>
<p> </p>
<p>Thanks in advance!!!</p>