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 width of crosstab cell.
Scarlett
<p>Is there a reason why <strong>reportContext.getDesignHandle().getElementByID(6398).setStringProperty("width", "0px")</strong></p><p>does not work in onCreateCell of a Crosstab.</p><p>However, </p><p>reportContext.getDesignHandle().getElementByID(6398).setStringProperty("height", "0px") - works just fine.</p>
Find more posts tagged with
Comments
kclark
<p>What version of BIRT are you running?</p>
Scarlett
3.7.2
Scarlett
<p>Any ideas on this one?</p>
kclark
<p>After using eclipsec.exe and doing</p><pre class="_prettyXprint">function onCreateCell( cellInst, reportContext ){ Packages.java.lang.System.out.println(cellInst.getCellID());}</pre><p>I found that each column shares an ID from cellInst. So to set the width for just one cell you would need to do something like this</p><pre class="_prettyXprint">var i = 0function onCreateCell( cellInst, reportContext ){ if (cellInst.getCellID() == 23){ i++; if(i == 3) { cellInst.getStyle().setDisplay("none") } } }</pre><p>From the onCreate() of the crosstab. The border stays but the data is blank since the width is set to 0px.</p>