Changing width of crosstab cell.

Scarlett
edited February 11, 2022 in Analytics #1
<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>

Comments

  • <p>What version of BIRT are you running?</p>
    Warning No formatter is installed for the format ipb
  • <p>Any ideas on this one?</p>
  • <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>
    Warning No formatter is installed for the format ipb