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)
changing the width of crosstab cell from script
MKI
I want to change the width of the crosstab cell from any of the events
I tried onPrepare and onCreate events
onPrepare event's onPrepareCell does not have any setter method for cell width
in the onCreate event's onCreateCell there is a width attribute
i tried doing
this.width="0px"; but it is not having any effect on the excel output
Please help i want to do it urgently
Find more posts tagged with
Comments
kclark
Are you trying to hide the cell? I ask because your code says you are trying to change it to 0px
kclark
This will also work in onPrepare()<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
function onPrepareCrosstab( crosstab, reportContext )
{
reportContext.getDesignHandle().getElementByID(38).setStringProperty("width","0px");
reportContext.getDesignHandle().getElementByID(40).setStringProperty("width","0px");
}
</pre>
<br />
Element ID 38 & 40 are my ID's so you'll need to make sure they point to the correct ones for you.
MKI
@kclark
Thank you:)
Your solution works perfectly